Commit 4b9466903fc46776870f1330cb077d4842efcbab

Authored by Dmitriy Zaporozhets
2 parents 92a92846 5d6d795d

Merge pull request #6503 from mjdetullio/fix/group-admin

[6.6] Fixes a bug with group member administration
Showing 2 changed files with 2 additions and 1 deletions   Show diff stats
app/models/ability.rb
... ... @@ -240,6 +240,7 @@ class Ability
240 240 can_manage = group_abilities(user, group).include?(:manage_group)
241 241 if can_manage && (user != target_user)
242 242 rules << :modify
  243 + rules << :destroy
243 244 end
244 245 if !group.last_owner?(user) && (can_manage || (user == target_user))
245 246 rules << :destroy
... ...
features/group.feature
... ... @@ -74,7 +74,7 @@ Feature: Groups
74 74 When I visit group "Owned" members page
75 75 Then I should see user "John Doe" in team list
76 76 Then I should see user "Mary Jane" in team list
77   - Then I should not see the "Remove User From Group" button for "Mary Jane"
  77 + Then I should not see the "Remove User From Group" button for "John Doe"
78 78  
79 79 @javascript
80 80 Scenario: Guest should be able to remove himself from group
... ...