Class: RolePermit::Admin
- Defined in:
- lib/permits.rb,
lib/generators/auth_assist/test.rb,
lib/generators/auth_assist/templates/permits.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(ability) ⇒ Admin
constructor
A new instance of Admin.
- #permit?(user, request) ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(ability) ⇒ Admin
Returns a new instance of Admin.
30 31 32 |
# File 'lib/permits.rb', line 30 def initialize(ability) super end |
Instance Method Details
#permit?(user, request) ⇒ Boolean
34 35 36 37 38 |
# File 'lib/permits.rb', line 34 def permit?(user) super return if !user.role? :admin can :manage, :all end |