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
546d11f4
Commit
546d11f4
authored
May 21, 2018
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE-specific code from app/controllers/groups/group_members_controller.rb
parent
fd8d9777
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
app/controllers/groups/group_members_controller.rb
app/controllers/groups/group_members_controller.rb
+5
-6
ee/app/controllers/ee/groups/group_members_controller.rb
ee/app/controllers/ee/groups/group_members_controller.rb
+13
-0
No files found.
app/controllers/groups/group_members_controller.rb
View file @
546d11f4
...
...
@@ -5,13 +5,12 @@ class Groups::GroupMembersController < Groups::ApplicationController
include
MembersPresentation
include
SortingHelper
# Authorize
before_action
:authorize_admin_group_member!
,
except:
[
:index
,
:leave
,
:request_access
,
:update
,
:override
]
before_action
:authorize_update_group_member!
,
only:
[
:update
,
:override
]
def
self
.
admin_not_required_endpoints
%i[index leave request_access
]
end
skip_cross_project_access_check
:index
,
:create
,
:update
,
:destroy
,
:request_access
,
:approve_access_request
,
:leave
,
:resend_invite
,
:override
# Authorize
before_action
:authorize_admin_group_member!
,
except:
admin_not_required_endpoints
skip_cross_project_access_check
:index
,
:create
,
:update
,
:destroy
,
:request_access
,
:approve_access_request
,
:leave
,
:resend_invite
,
...
...
ee/app/controllers/ee/groups/group_members_controller.rb
View file @
546d11f4
...
...
@@ -3,6 +3,19 @@ module EE
module
GroupMembersController
extend
ActiveSupport
::
Concern
class_methods
do
extend
::
Gitlab
::
Utils
::
Override
override
:admin_not_required_endpoints
def
admin_not_required_endpoints
super
.
concat
(
%i[update override]
)
end
end
included
do
before_action
:authorize_update_group_member!
,
only:
[
:update
,
:override
]
end
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def
override
member
=
@group
.
members
.
find_by!
(
id:
params
[
:id
])
...
...
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