Class: Authority::Configuration
- Inherits:
-
Object
- Object
- Authority::Configuration
- Defined in:
- lib/authority/configuration.rb
Instance Attribute Summary (collapse)
-
- (Object) abilities
Has default settings, overrideable in the initializer.
-
- (Object) controller_action_map
Has default settings, overrideable in the initializer.
-
- (Object) default_strategy
Has default settings, overrideable in the initializer.
-
- (Object) logger
Has default settings, overrideable in the initializer.
-
- (Object) security_violation_handler
Has default settings, overrideable in the initializer.
-
- (Object) user_method
Has default settings, overrideable in the initializer.
Instance Method Summary (collapse)
-
- (Configuration) initialize
constructor
A new instance of Configuration.
Constructor Details
- (Configuration) initialize
A new instance of Configuration
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/authority/configuration.rb', line 8 def initialize @default_strategy = Proc.new do |able, , user| false end @abilities = { :create => 'creatable', :read => 'readable', :update => 'updatable', :delete => 'deletable' } @controller_action_map = { :index => 'read', :show => 'read', :new => 'create', :create => 'create', :edit => 'update', :update => 'update', :destroy => 'delete' } @user_method = :current_user @security_violation_handler = :authority_forbidden @logger = Logger.new(STDERR) end |
Instance Attribute Details
- (Object) abilities
Has default settings, overrideable in the initializer.
6 7 8 |
# File 'lib/authority/configuration.rb', line 6 def abilities @abilities end |
- (Object) controller_action_map
Has default settings, overrideable in the initializer.
6 7 8 |
# File 'lib/authority/configuration.rb', line 6 def controller_action_map @controller_action_map end |
- (Object) default_strategy
Has default settings, overrideable in the initializer.
6 7 8 |
# File 'lib/authority/configuration.rb', line 6 def default_strategy @default_strategy end |
- (Object) logger
Has default settings, overrideable in the initializer.
6 7 8 |
# File 'lib/authority/configuration.rb', line 6 def logger @logger end |
- (Object) security_violation_handler
Has default settings, overrideable in the initializer.
6 7 8 |
# File 'lib/authority/configuration.rb', line 6 def security_violation_handler @security_violation_handler end |
- (Object) user_method
Has default settings, overrideable in the initializer.
6 7 8 |
# File 'lib/authority/configuration.rb', line 6 def user_method @user_method end |