summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2018-11-12 22:40:42 +0100
committerImre Farkas <ifarkas@gitlab.com>2018-11-18 21:00:28 +0100
commit02326fa4b128c6272cc5c802cf5145f0fa6f6cc2 (patch)
treea17739647988e8f2c3e414cb9c91d76c09496f6a /app/controllers
parent29d8179ba07be3ed111f939285eb4064d84cb7df (diff)
downloadgitlab-ce-02326fa4b128c6272cc5c802cf5145f0fa6f6cc2.tar.gz
Backport of ee/8120: Smartcard authenticationif-ee-726-smartcard_auth-ce_port
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb4
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 }