summaryrefslogtreecommitdiff
path: root/app/controllers/projects/branches_controller.rb
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-10-13 21:31:49 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-10-13 21:31:49 +0200
commit4d0d5e79ba4317cedfb2b0304ac5d376ad781b1a (patch)
treefdbf97a50f8c8ccde579c07e340079a50cf407ef /app/controllers/projects/branches_controller.rb
parente261de255dfff71f5acc7d33f339a30a3cb32ab9 (diff)
downloadgitlab-ce-4d0d5e79ba4317cedfb2b0304ac5d376ad781b1a.tar.gz
Factor authorize_push! and authorize_code_access!
with existing method_missing. Pattern already used extensively, so let's be consistent and use it everywhere.
Diffstat (limited to 'app/controllers/projects/branches_controller.rb')
-rw-r--r--app/controllers/projects/branches_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index faa0ce67ca8..dd6df5d196b 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -3,8 +3,8 @@ class Projects::BranchesController < Projects::ApplicationController
before_filter :authorize_read_project!
before_filter :require_non_empty_project
- before_filter :authorize_code_access!
- before_filter :authorize_push!, only: [:create, :destroy]
+ before_filter :authorize_download_code!
+ before_filter :authorize_push_code!, only: [:create, :destroy]
def index
@sort = params[:sort] || 'name'