Module: Bpluser::Ability::InstanceMethods
- Defined in:
- app/models/bpluser/ability.rb
Instance Method Summary collapse
Instance Method Details
#initialize(user) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/models/bpluser/ability.rb', line 8 def initialize(user) #can :read, :all user ||= User.new # guest user (not logged in) if user.superuser? can [:create, :show, :add_user, :edit, :remove_user, :index], Role can [:create, :show, :add_user, :edit, :remove_user, :index], Institution else can [:show, :index], Institution end end |