| 1 | package Articulate::Authorisation::AlwaysAllow; | ||
| 2 | 7 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 7 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 7 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Articulate::Authorisation::AlwaysAllow - don't use this in production | ||
| 10 | |||
| 11 | =cut | ||
| 12 | |||
| 13 | =head1 CONFIGURATION | ||
| 14 | |||
| 15 | Put this in your C<development.yml>, NOT in your C<config.yml> or your | ||
| 16 | C<production.yml>. You have been warned. | ||
| 17 | |||
| 18 | components: | ||
| 19 | authorisation: | ||
| 20 | Articulate::Authorisation: | ||
| 21 | rules: | ||
| 22 | - Articulate::Authorisation::AlwaysAllow | ||
| 23 | |||
| 24 | There's nothing else to configure, the answer is always yes. | ||
| 25 | |||
| 26 | =head1 METHODS | ||
| 27 | |||
| 28 | =head3 new | ||
| 29 | |||
| 30 | Does what all good C<new> methods do, nothing more. | ||
| 31 | |||
| 32 | =head3 permitted | ||
| 33 | |||
| 34 | Handles all the complex business logic required to ensure that the | ||
| 35 | request is always authorised. | ||
| 36 | |||
| 37 | So don't use this in production. | ||
| 38 | |||
| 39 | =cut | ||
| 40 | |||
| 41 | 5 | ▶ | sub permitted { |
|
Subroutine
permitted: called CC=1 SCAR=0.0
Pod
documented
| |||
| 42 | 5 | my $self = shift; | |
| 43 | 5 | my $permission = shift; | |
| 44 | 5 | $permission->grant('Anything is possible!'); | |
| 45 | } | ||
| 46 | |||
| 47 | =head1 BUGS | ||
| 48 | |||
| 49 | Don't come crying to me if you use this in production. | ||
| 50 | |||
| 51 | =cut | ||
| 52 | |||
| 53 | 7 | 1; | |