Exception: Organizations::NotAuthorized
- Defined in:
- lib/organizations.rb
Overview
Authorization errors - raised when user doesn't have permission
Instance Attribute Summary collapse
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#permission ⇒ Object
readonly
Returns the value of attribute permission.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(message = nil, permission: nil, organization: nil, user: nil) ⇒ NotAuthorized
constructor
A new instance of NotAuthorized.
Constructor Details
#initialize(message = nil, permission: nil, organization: nil, user: nil) ⇒ NotAuthorized
Returns a new instance of NotAuthorized.
19 20 21 22 23 24 |
# File 'lib/organizations.rb', line 19 def initialize( = nil, permission: nil, organization: nil, user: nil) super() @permission = @organization = organization @user = user end |
Instance Attribute Details
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
17 18 19 |
# File 'lib/organizations.rb', line 17 def organization @organization end |
#permission ⇒ Object (readonly)
Returns the value of attribute permission.
17 18 19 |
# File 'lib/organizations.rb', line 17 def @permission end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
17 18 19 |
# File 'lib/organizations.rb', line 17 def user @user end |