Class: RolePermit::Moderator
- Defined in:
- lib/permits.rb,
lib/generators/auth_assist/templates/permits.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(ability) ⇒ Moderator
constructor
A new instance of Moderator.
- #permit?(user, request) ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(ability) ⇒ Moderator
Returns a new instance of Moderator.
63 64 65 |
# File 'lib/permits.rb', line 63 def initialize(ability) super end |
Instance Method Details
#permit?(user, request) ⇒ Boolean
67 68 69 70 71 72 |
# File 'lib/permits.rb', line 67 def permit?(user) super return if !user.role?(:moderator) can :read, :all # owns(user, Comment) end |