Class: Cerbos::Input::ResourceCheck
- Inherits:
-
Object
- Object
- Cerbos::Input::ResourceCheck
- Defined in:
- lib/cerbos/input/resource_check.rb
Overview
A resource and actions to check a principal's permissions.
Instance Attribute Summary collapse
-
#actions ⇒ Array<String>
readonly
The actions to check.
-
#resource ⇒ Resource
readonly
The resource to check.
Instance Method Summary collapse
-
#initialize(resource:, actions:) ⇒ ResourceCheck
constructor
Specify a resource and actions to check a principal's permissions.
Constructor Details
#initialize(resource:, actions:) ⇒ ResourceCheck
Specify a resource and actions to check a principal's permissions.
21 22 23 24 |
# File 'lib/cerbos/input/resource_check.rb', line 21 def initialize(resource:, actions:) @resource = Input.coerce_required(resource, Resource) @actions = actions end |
Instance Attribute Details
#actions ⇒ Array<String> (readonly)
The actions to check.
15 16 17 |
# File 'lib/cerbos/input/resource_check.rb', line 15 def actions @actions end |
#resource ⇒ Resource (readonly)
The resource to check.
10 11 12 |
# File 'lib/cerbos/input/resource_check.rb', line 10 def resource @resource end |