Class: RivetCms::AccessCheck
- Inherits:
-
Struct
- Object
- Struct
- RivetCms::AccessCheck
- Defined in:
- lib/rivet_cms/access_check.rb
Overview
Immutable description of one authorization check, passed to RivetCms.can. Checks run in two phases: first with record nil, before anything loads ("is this action available to the user at all", also drives the sidebar), then again with record set to the loaded entry, content type, field, component, media asset, or API token. Fields may be ADDED in minor releases; policies should read only the fields they need and treat unknown action/resource symbols as deny, since the vocabulary grows.
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#organization ⇒ Object
Returns the value of attribute organization.
-
#record ⇒ Object
Returns the value of attribute record.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
9 10 11 |
# File 'lib/rivet_cms/access_check.rb', line 9 def action @action end |
#organization ⇒ Object
Returns the value of attribute organization
9 10 11 |
# File 'lib/rivet_cms/access_check.rb', line 9 def organization @organization end |
#record ⇒ Object
Returns the value of attribute record
9 10 11 |
# File 'lib/rivet_cms/access_check.rb', line 9 def record @record end |
#resource ⇒ Object
Returns the value of attribute resource
9 10 11 |
# File 'lib/rivet_cms/access_check.rb', line 9 def resource @resource end |
#user ⇒ Object
Returns the value of attribute user
9 10 11 |
# File 'lib/rivet_cms/access_check.rb', line 9 def user @user end |