allow for organizers to also manage users

This commit is contained in:
Stella Rouzi 2014-08-17 16:40:48 +03:00 committed by Gopesh Tulsyan
parent 5485fe0e7f
commit 361e149e86

View file

@ -67,7 +67,7 @@ class Ability
signed_in(user) # Inherit abilities from signed user
# User with role
can :manage, User if user.is_admin # ??? || (user.has_role? :organizer, :any)
can :manage, User if user.is_admin || (user.has_role? :organizer, :any)
can [:new, :create], Conference if user.is_admin || (user.has_role? :organizer, :any)
can [:index, :show, :gallery_photos], Conference
can :manage, Conference, id: conf_ids_for_organizer