Merge pull request #146 from warpc/fix-autocomplete-group

Fix autocomplete for group in porjects for collaborators [Fix #145]
This commit is contained in:
Vladimir Sharshov 2012-02-01 13:24:47 -08:00
commit 7c93f684cf
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class Ability
can [:show, :update], Settings::Notifier, :user_id => user.id can [:show, :update], Settings::Notifier, :user_id => user.id
can [:read, :create], Group can [:read, :create, :autocomplete_group_uname], Group
can [:update, :manage_members], Group do |group| can [:update, :manage_members], Group do |group|
group.objects.exists?(:object_type => 'User', :object_id => user.id, :role => 'admin') # or group.owner_id = user.id group.objects.exists?(:object_type => 'User', :object_id => user.id, :role => 'admin') # or group.owner_id = user.id
end end