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