Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
254a5e14cebb
Commit
a89d6d14
authored
Dec 03, 2015
by
Douwe Maan
Browse files
Add authorization to new branch/tag pages.
parent
4185f97b2c61
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/projects/branches_controller.rb
View file @
254a5e14
...
...
@@ -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'
...
...
app/controllers/projects/tags_controller.rb
View file @
254a5e14
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment