search for: global_us

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

Did you mean: global_up
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 exam...