Commit 5f31caa0ed88b0d779336d909dc7f48b9f86cd25
1 parent
b6a93420
Exists in
spb-stable
and in
3 other branches
Fix read_group ability
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/ability.rb
... | ... | @@ -184,7 +184,7 @@ class Ability |
184 | 184 | def group_abilities user, group |
185 | 185 | rules = [] |
186 | 186 | |
187 | - if user.admin? || Projects::CollectService.new.execute(user, group: group).any? | |
187 | + if user.admin? || group.users.include?(user) || Projects::CollectService.new.execute(user, group: group).any? | |
188 | 188 | rules << :read_group |
189 | 189 | end |
190 | 190 | ... | ... |