class Wallaby::DefaultAuthorizationProvider
Default authorization provider that whitelists everything.
Public Class Methods
available?(_context)
click to toggle source
It returns false so that it can be used as the last resort. @param _context [ActionController::Base, ActionView::Base] @return [false]
# File lib/authorizers/wallaby/default_authorization_provider.rb, line 9 def self.available?(_context) false end
Public Instance Methods
accessible_for(_action, scope)
click to toggle source
Do nothing @param _action [Symbol, String] @param scope [Object]
# File lib/authorizers/wallaby/default_authorization_provider.rb, line 31 def accessible_for(_action, scope) scope end
attributes_for(_action, _subject)
click to toggle source
Return empty attributes @param _action [Symbol, String] @param _subject [Object] @return [Hash] empty hash
# File lib/authorizers/wallaby/default_authorization_provider.rb, line 39 def attributes_for(_action, _subject) {} end
permit_params(_action, _subject)
click to toggle source
@note Please make sure to return nil when the authorization provider doesn't support this feature. @param _action [Symbol, String] @param _subject [Object] @return [nil]
# File lib/authorizers/wallaby/default_authorization_provider.rb, line 47 def permit_params(_action, _subject) # Do nothing end