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
iv
gitlab-ce
Commits
4b946690
Commit
4b946690
authored
Mar 11, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6503 from mjdetullio/fix/group-admin
[6.6] Fixes a bug with group member administration
parents
92a92846
5d6d795d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
app/models/ability.rb
app/models/ability.rb
+1
-0
features/group.feature
features/group.feature
+1
-1
No files found.
app/models/ability.rb
View file @
4b946690
...
...
@@ -240,6 +240,7 @@ class Ability
can_manage
=
group_abilities
(
user
,
group
).
include?
(
:manage_group
)
if
can_manage
&&
(
user
!=
target_user
)
rules
<<
:modify
rules
<<
:destroy
end
if
!
group
.
last_owner?
(
user
)
&&
(
can_manage
||
(
user
==
target_user
))
rules
<<
:destroy
...
...
features/group.feature
View file @
4b946690
...
...
@@ -74,7 +74,7 @@ Feature: Groups
When
I visit group
"Owned"
members page
Then
I should see user
"John Doe"
in team list
Then
I should see user
"Mary Jane"
in team list
Then
I should not see the
"Remove User From Group"
button for
"
Mary Jan
e"
Then
I should not see the
"Remove User From Group"
button for
"
John Do
e"
@javascript
Scenario
:
Guest should be able to remove himself from group
...
...
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