Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e7a4bbb0
Commit
e7a4bbb0
authored
Oct 04, 2016
by
Douglas Barbosa Alexandre
Committed by
Phil Hughes
Oct 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add authorization to Projects::Boards::IssuesController#create action
parent
905af847
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
app/controllers/projects/boards/issues_controller.rb
app/controllers/projects/boards/issues_controller.rb
+5
-0
No files found.
app/controllers/projects/boards/issues_controller.rb
View file @
e7a4bbb0
...
...
@@ -2,6 +2,7 @@ module Projects
module
Boards
class
IssuesController
<
Boards
::
ApplicationController
before_action
:authorize_read_issue!
,
only:
[
:index
]
before_action
:authorize_create_issue!
,
only:
[
:create
]
before_action
:authorize_update_issue!
,
only:
[
:update
]
def
index
...
...
@@ -52,6 +53,10 @@ module Projects
return
render_403
unless
can?
(
current_user
,
:read_issue
,
project
)
end
def
authorize_create_issue!
return
render_403
unless
can?
(
current_user
,
:admin_issue
,
project
)
end
def
authorize_update_issue!
return
render_403
unless
can?
(
current_user
,
:update_issue
,
issue
)
end
...
...
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