Class: AuthAssistant::Configuration
- Inherits:
-
Object
- Object
- AuthAssistant::Configuration
- Includes:
- Singleton
- Defined in:
- lib/auth_assistant/model/user_config.rb
Instance Attribute Summary collapse
-
#available_roles ⇒ Object
Returns the value of attribute available_roles.
-
#role_strategy ⇒ Object
Returns the value of attribute role_strategy.
Instance Method Summary collapse
Instance Attribute Details
#available_roles ⇒ Object
Returns the value of attribute available_roles.
13 14 15 |
# File 'lib/auth_assistant/model/user_config.rb', line 13 def available_roles @available_roles end |
#role_strategy ⇒ Object
Returns the value of attribute role_strategy.
12 13 14 |
# File 'lib/auth_assistant/model/user_config.rb', line 12 def role_strategy @role_strategy end |
Instance Method Details
#available_strategies ⇒ Object
16 17 18 |
# File 'lib/auth_assistant/model/user_config.rb', line 16 def available_strategies [:admin_field, :role_field, :roles_field, :roles_mask, :role_assignment, :multi_role_assignment] end |
#strategy(name) ⇒ Object
20 21 22 23 |
# File 'lib/auth_assistant/model/user_config.rb', line 20 def strategy(name) n = name.to_s available_strategies.include?(n.to_sym) ? n.to_sym : :roles_field end |