Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt DeTullio <mjdetullio@gmail.com>2014-03-10 07:28:49 +0400
committerMatt DeTullio <mjdetullio@gmail.com>2014-03-11 06:56:26 +0400
commit5d6d795d60050c2c5db95501b6de38e458fd41b6 (patch)
tree4810be638086fe8da08f8ec84616e3b7c3f186c0 /app/models/ability.rb
parentc3f088d2610b83d06091aa9fdbbb8e0cc3ea8ca3 (diff)
Fixes a bug with group member administration
Group owners were not able to remove any users from their group if they were the only owner.
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 69ada753d02..1afe8a4638f 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -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