Class: Ability::Manager

Inherits:
Object
  • Object
show all
Includes:
Shared::PowerUser, CanCan::Ability
Defined in:
app/models/ability/manager.rb

Overview

Privileges granted to users with the manager role Note: This role should be by association only (ie. You can ‘manage’ a particular) study, yet also grants global privileges. This is especially problematic, as you automatically becoem a manager of any project you create, and anyone can create a project

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ Manager

Returns a new instance of Manager.



16
17
18
19
# File 'app/models/ability/manager.rb', line 16

def initialize(user)
  @user = user
  grant_privileges
end

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



14
15
16
# File 'app/models/ability/manager.rb', line 14

def user
  @user
end