Module: Doorman
- Defined in:
- lib/doorman.rb,
lib/doorman/rule.rb,
lib/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/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/doorman.rb', line 17
def supported_method?(method)
SUPPORTED_METHODS.include?(method)
end
|