Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 74927b4db81..fa6c9777824 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -235,8 +235,8 @@ module API
forbidden! unless current_user.admin?
end
- def authorize!(action, subject = :global)
- forbidden! unless can?(current_user, action, subject)
+ def authorize!(action, subject = :global, reason = nil)
+ forbidden!(reason) unless can?(current_user, action, subject)
end
def authorize_push_project