Add authorization to new branch/tag pages.
This commit is contained in:
parent
6689224a90
commit
a89d6d1428
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue