Module: ActiveSecurity::Restricted::Configuration

Defined in:
lib/active_security/restricted.rb

Overview

This module adds ‘:restricted_hooks`, `:on_restricted_no_scope` and `:on_restricted_unhandled_predicate` configuration options to ActiveSecurity::Configuration.

Instance Attribute Summary collapse

Instance Attribute Details

#on_restricted_no_scopeObject

Returns Symbol The on_restricted_no_scope value.

Returns:

  • Symbol The on_restricted_no_scope value



41
42
43
# File 'lib/active_security/restricted.rb', line 41

def on_restricted_no_scope
  @on_restricted_no_scope ||= defaults[:on_restricted_no_scope]
end

#on_restricted_unhandled_predicateObject

Returns Symbol The on_restricted_unhandled_predicate value.

Returns:

  • Symbol The on_restricted_unhandled_predicate value



46
47
48
# File 'lib/active_security/restricted.rb', line 46

def on_restricted_unhandled_predicate
  @on_restricted_unhandled_predicate ||= defaults[:on_restricted_unhandled_predicate]
end

#restricted_hooksObject

Returns Module The module to use for restricted_hooks.

Returns:

  • Module The module to use for restricted_hooks



36
37
38
# File 'lib/active_security/restricted.rb', line 36

def restricted_hooks
  @restricted_hooks ||= defaults[:restricted_hooks]
end