Articulate::Permission - represent a permission request/response
my $permission = new_permission $user, verb => $location;
Creates a new permission request, using the user, verb and location supplied as the respective arguments.
An unremarkable Moo constructor.
$permission->grant('Anybody can do that!');
Declares that the user has that permission, for the reason given; sets granted and denied and populates the stack trace.
granted
denied
$permission->deny('Don\t touch that!');
Declares that the user does not have that permission, for the reason given; sets granted and denied and populates the stack trace.
The user_id requesting permission to access the resource.
The action being performed, e.g. read, write, etc. The verbs available are entirely dependant on the application.
read
write
A permission request will be granted or denied by an authorisation rule (see Articulate::Authorisation), who will typically implement verbs that bay be different from but are either a) broader than, or b) equally broad as, the verbs used by the Articulate::Service.
The location of the resource for which permission is requested.
Whether or not the permission has been explicitly granted. The value of this is used for overload behaviour.
Please do not explicitly set this. Use grant instead.
grant
Whether the permission has been explicitly denied.
Please do not explicitly set this. Use deny instead.
deny
The reason for the grant or denial of permission.
Please do not explicitly set this. Use grant or deny instead.
The stack trace at the point of grant or denial of permission.
Articulate::Authorisation
Articulate::Credentials (which performs a similar function for Articulate::Authentication)
To install Articulate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Articulate
CPAN shell
perl -MCPAN -e shell install Articulate
For more information on module installation, please visit the detailed CPAN module installation guide.