Class: ApplicationAuthorizer
- Inherits:
-
Authority::Authorizer
- Object
- Authority::Authorizer
- ApplicationAuthorizer
- Defined in:
- app/authorizers/application_authorizer.rb
Overview
Other authorizers should subclass this one
Class Method Summary collapse
-
.default(adjective, user) ⇒ Boolean
Any class method from Authority::Authorizer that isn’t overridden will call its authorizer’s default method.
Class Method Details
.default(adjective, user) ⇒ Boolean
Any class method from Authority::Authorizer that isn’t overridden will call its authorizer’s default method.
10 11 12 13 14 15 16 |
# File 'app/authorizers/application_authorizer.rb', line 10 def self.default(adjective, user) # 'Whitelist' strategy for security: anything not explicitly allowed is # considered forbidden. # default was false user.has_role? :admin end |