search for: global_user

Displaying 1 result from an estimated 1 matches for "global_user".

2011 Mar 02
1
Setting CanCan ability.rs model
...all), State (read) And I tried to do this with following code in ability.rs: class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user (not logged in) if user.role? :admin can :manage, [Report, Admin] can :read, State elsif user.role? :global_user can :read, [Report, State] can :manage, Cpanel elsif user.role? :internal_user can :manage, Report can :read, State end end end At this time I have only index actions in this controllers, and when I login to app with internal user I CAN access to /admin for exampl...