[#125] restore ability admin of the groups

This commit is contained in:
Alexander Machehin 2013-05-07 21:26:50 +06:00
parent 9d3be37fab
commit ccb5665aae
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ class Ability
group.actors.exists?(:actor_type => 'User', :actor_id => user.id, :role => 'admin') # or group.owner_id = user.id
end
can :write, Group do |group|
group.actors.exists?(:actor_type => 'User', :actor_id => user.id, :role => 'writer')
group.actors.exists?(:actor_type => 'User', :actor_id => user.id, :role => ['writer', 'admin'])
end
can :destroy, Group, :owner_id => user.id
can :remove_user, Group