Module: Doorman
- Defined in:
- lib/rails_doorman.rb,
lib/rails_doorman/rule.rb,
lib/rails_doorman/helpers.rb
Defined Under Namespace
Modules: ClassMethods, Helpers, InstanceMethods, SharedMethods
Classes: InvalidRule, Rule, Unauthorized
Constant Summary
collapse
- SUPPORTED_METHODS =
[:block, :host, :role, :user, :user_agent].freeze
Class Method Summary
collapse
Class Method Details
.options ⇒ Object
8
9
10
11
12
13
|
# File 'lib/rails_doorman.rb', line 8
def options
@options ||= {
:user_identifier_method => :login,
:has_role_method => :has_role?
}
end
|
.supported_method?(method) ⇒ Boolean
17
18
19
|
# File 'lib/rails_doorman.rb', line 17
def supported_method?(method)
SUPPORTED_METHODS.include?(method)
end
|