Class: Checkpoint::Credential::Permission
- Inherits:
-
Checkpoint::Credential
- Object
- Checkpoint::Credential
- Checkpoint::Credential::Permission
- Defined in:
- lib/checkpoint/credential/permission.rb
Overview
A Permission is simple extension to the base Credential, specifying its type as a permission and providing a conceptual object to be instantiated or passed.
The most common use from outside Checkpoint will be by way of Query::ActionPermitted, which will ask whether a given named action is permitted for a user. However, Permission could be extended or modified to implement aliasing or hierarchy, for example.
More likely, though, is advising the resolution of Permissions with a role map and RoleMapResolver or implementing a custom Resolver. Subclassing or monkey-patching Permission should only be necessary if the application needs to extend the actual behavior of the Permission objects, rather than just which ones are resolved.
Constant Summary collapse
- TYPE =
'permission'
Instance Attribute Summary
Attributes inherited from Checkpoint::Credential
Instance Method Summary collapse
Methods inherited from Checkpoint::Credential
#eql?, #granted_by, #initialize, #to_credential, #token
Constructor Details
This class inherits a constructor from Checkpoint::Credential
Instance Method Details
#type ⇒ Object
23 24 25 |
# File 'lib/checkpoint/credential/permission.rb', line 23 def type TYPE end |