From 5f31caa0ed88b0d779336d909dc7f48b9f86cd25 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 25 Feb 2014 15:45:19 +0200 Subject: [PATCH] Fix read_group ability --- app/models/ability.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index e5b5771..7b7a46b 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -184,7 +184,7 @@ class Ability def group_abilities user, group rules = [] - if user.admin? || Projects::CollectService.new.execute(user, group: group).any? + if user.admin? || group.users.include?(user) || Projects::CollectService.new.execute(user, group: group).any? rules << :read_group end -- libgit2 0.21.2