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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
eb99e5f5
Commit
eb99e5f5
authored
Apr 20, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused authorization from controller
parent
0b91ff28
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
+2
-8
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+0
-5
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/models/ability.rb
app/models/ability.rb
+1
-2
No files found.
app/controllers/projects/project_members_controller.rb
View file @
eb99e5f5
class
Projects::ProjectMembersController
<
Projects
::
ApplicationController
# Authorize
before_action
:authorize_admin_project_member!
,
except:
[
:leave
,
:index
]
before_action
:authorize_read_members_list!
,
only:
[
:index
]
def
index
@project_members
=
@project
.
project_members
...
...
@@ -113,8 +112,4 @@ class Projects::ProjectMembersController < Projects::ApplicationController
def
member_params
params
.
require
(
:project_member
).
permit
(
:user_id
,
:access_level
)
end
def
authorize_read_members_list!
render_403
unless
can?
(
current_user
,
:read_members_list
,
@project
)
end
end
app/helpers/projects_helper.rb
View file @
eb99e5f5
...
...
@@ -144,7 +144,7 @@ module ProjectsHelper
nav_tabs
<<
:settings
end
if
can?
(
current_user
,
:read_
members_list
,
project
)
if
can?
(
current_user
,
:read_
project_member
,
project
)
nav_tabs
<<
:team
end
...
...
app/models/ability.rb
View file @
eb99e5f5
...
...
@@ -189,8 +189,7 @@ class Ability
:create_project
,
:create_issue
,
:create_note
,
:upload_file
,
:read_members_list
:upload_file
]
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