Class: LogicalAuthz::AccessControl::Authorized
- Defined in:
- lib/logical_authz/access_control.rb
Instance Attribute Summary
Attributes inherited from Policy
Instance Method Summary collapse
-
#check(criteria) ⇒ Object
This probably needs some assurance that it cannot loop.
- #default_name ⇒ Object
Methods inherited from Policy
#evaluate, #initialize, #laz_debug, names, register
Constructor Details
This class inherits a constructor from LogicalAuthz::AccessControl::Policy
Instance Method Details
#check(criteria) ⇒ Object
This probably needs some assurance that it cannot loop
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/logical_authz/access_control.rb', line 291 def check(criteria) criteria[:authorization_depth] ||= 0 criteria[:authorization_depth] += 1 if criteria[:authorization_depth] > 10 raise "Authorization recursion limit reached" end LogicalAuthz.(criteria) end |
#default_name ⇒ Object
286 287 288 |
# File 'lib/logical_authz/access_control.rb', line 286 def default_name "When Authorized" end |