diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-11-13 00:40:42 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-11-18 23:00:28 +0300 |
commit | 02326fa4b128c6272cc5c802cf5145f0fa6f6cc2 (patch) | |
tree | a17739647988e8f2c3e414cb9c91d76c09496f6a /app/controllers | |
parent | 29d8179ba07be3ed111f939285eb4064d84cb7df (diff) |
Backport of ee/8120: Smartcard authentication
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7f4aa8244ac..b839da7770d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -181,11 +181,11 @@ class ApplicationController < ActionController::Base Ability.allowed?(object, action, subject) end - def access_denied!(message = nil) + def access_denied!(message = nil, status = nil) # If we display a custom access denied message to the user, we don't want to # hide existence of the resource, rather tell them they cannot access it using # the provided message - status = message.present? ? :forbidden : :not_found + status ||= message.present? ? :forbidden : :not_found respond_to do |format| format.any { head status } |