Sha256: 697f8c70dd7c8ae43968a173583d32cae820172580cb93fa64554134c68ead84
Contents?: true
Size: 577 Bytes
Versions: 4
Compression:
Stored size: 577 Bytes
Contents
# Other authorizers should subclass this one class ApplicationAuthorizer < Authority::Authorizer # Any class method from Authority::Authorizer that isn't overridden # will call its authorizer's default method. # # @param [Symbol] adjective; example: `:creatable` # @param [Object] user - whatever represents the current user in your app # @return [Boolean] def self.default(adjective, user) # 'Whitelist' strategy for security: anything not explicitly allowed is # considered forbidden. # default was false user.has_role? :admin end end
Version data entries
4 entries across 4 versions & 2 rubygems