Exception: Bali::AuthorizationError
- Defined in:
- lib/bali/foundations/exceptions/authorization_error.rb
Overview
Error that will be raised when subtarget cannot do something he wanted to do, or when subtarget do something he should not be allowed to do.
Instance Attribute Summary collapse
-
#auth_level ⇒ Object
Returns the value of attribute auth_level.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#role ⇒ Object
Returns the value of attribute role.
-
#subtarget ⇒ Object
it may be nil, depends on whether rule checking is using symbol/user.
-
#target ⇒ Object
whether a class or an object.
Instance Method Summary collapse
Instance Attribute Details
#auth_level ⇒ Object
Returns the value of attribute auth_level.
5 6 7 |
# File 'lib/bali/foundations/exceptions/authorization_error.rb', line 5 def auth_level @auth_level end |
#operation ⇒ Object
Returns the value of attribute operation.
4 5 6 |
# File 'lib/bali/foundations/exceptions/authorization_error.rb', line 4 def operation @operation end |
#role ⇒ Object
Returns the value of attribute role.
6 7 8 |
# File 'lib/bali/foundations/exceptions/authorization_error.rb', line 6 def role @role end |
#subtarget ⇒ Object
it may be nil, depends on whether rule checking is using symbol/user
9 10 11 |
# File 'lib/bali/foundations/exceptions/authorization_error.rb', line 9 def subtarget @subtarget end |
#target ⇒ Object
whether a class or an object
12 13 14 |
# File 'lib/bali/foundations/exceptions/authorization_error.rb', line 12 def target @target end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/bali/foundations/exceptions/authorization_error.rb', line 14 def to_s "Role #{role} is performing #{operation} using precedence #{auth_level}" end |