diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-17 01:44:33 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-17 01:44:33 +0300 |
commit | ec20fdf366843e60ed30abb5322c3c1b8f471b4a (patch) | |
tree | fd33118e0af74924bcb20a1696d91f85f6cd463c /app/models/ability.rb | |
parent | de251bcf6d0f1db8858fa38ac14e108c1b9ea00f (diff) |
Code improvements and add Create group service
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index fe460ccdaca..bd001ef1545 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -295,8 +295,8 @@ class Ability end def can_read_group?(user, group) - is_project_member = ProjectsFinder.new.execute(user, group: group).any? - user.admin? || group.public? || group.internal? || is_project_member || group.users.include?(user) + user.admin? || group.public? || group.internal? || group.users.include?(user) || + ProjectsFinder.new.execute(user, group: group).any? end def namespace_abilities(user, namespace) |