line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CatalystX::Eta::Controller::CheckRoleForPOST; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1325
|
use Moose::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
requires 'list_POST'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
around list_POST => \&CheckRoleForPOST_around_list_POST; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub CheckRoleForPOST_around_list_POST { |
10
|
2
|
|
|
2
|
|
18
|
my $orig = shift; |
11
|
2
|
|
|
|
|
5
|
my $self = shift; |
12
|
2
|
|
|
|
|
17
|
my $config = $self->config; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
195
|
my ( $c, $id ) = @_; |
15
|
2
|
|
|
|
|
5
|
my $do_detach = 0; |
16
|
|
|
|
|
|
|
|
17
|
2
|
50
|
|
|
|
7
|
if ( exists $self->config->{create_roles} ) { |
18
|
2
|
50
|
|
|
|
115
|
if ( !$c->check_any_user_role( @{ $config->{create_roles} } ) ) { |
|
2
|
|
|
|
|
18
|
|
19
|
0
|
|
|
|
|
0
|
$self->status_forbidden( $c, message => "insufficient privileges" ); |
20
|
0
|
|
|
|
|
0
|
$c->detach; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
2
|
|
|
|
|
1111
|
$self->$orig(@_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|