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 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 5a5b4aeb8d4..ee2240b2f0f 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -48,6 +48,10 @@ class ApplicationController < ActionController::Base
return render_404 unless can?(current_user, action, project)
end
+ def authorize_code_access!
+ return render_404 unless can?(current_user, :download_code, project)
+ end
+
def access_denied!
render_404
end