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