diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-03 18:53:17 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-03 18:53:17 +0100 |
commit | a89d6d1428d61bd2ae6f530acfc5a34d5a9c46e8 (patch) | |
tree | 4751c503cb7f82e756ff0ddec16c00da9e400886 | |
parent | 6689224a90f3d2500be5d927ea1ed9656fc7b1b6 (diff) | |
download | gitlab-ce-new-tag-branch-authorization.tar.gz |
Add authorization to new branch/tag pages.new-tag-branch-authorization
-rw-r--r-- | app/controllers/projects/branches_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index 3ac0a75fa70..3c2849a7601 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -3,7 +3,7 @@ class Projects::BranchesController < Projects::ApplicationController # Authorize before_action :require_non_empty_project before_action :authorize_download_code! - before_action :authorize_push_code!, only: [:create, :destroy] + before_action :authorize_push_code!, only: [:new, :create, :destroy] def index @sort = params[:sort] || 'name' diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index cb39c2b8782..280fe12cc7c 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -2,7 +2,7 @@ class Projects::TagsController < Projects::ApplicationController # Authorize before_action :require_non_empty_project before_action :authorize_download_code! - before_action :authorize_push_code!, only: [:create] + before_action :authorize_push_code!, only: [:new, :create] before_action :authorize_admin_project!, only: [:destroy] def index |