Uaf/Rule.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 40 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
grants
2.0
denies
2.0
CRAP 2.0
1 package Gantry::Plugins::Uaf::Rule;
2  
3 use 5.008;
4 use strict;
5 use warnings;
6  
7 our $VERSION = '0.01';
8  
9 sub new {
10 my $proto = shift;
11  
12 my $class = ref($proto) || $proto;
13 my $self = { };
14  
15 bless ($self, $class);
16  
17 return $self;
18  
19 }
20  
21 sub grants($$$$) {
22  
23 my $self = shift;
24 my $user = shift;
25 my $action = shift;
26 my $resource = shift;
27  
28 return 0;
29  
30 }
31  
32 sub denies($$$$) {
33  
34 my $self = shift;
35 my $user = shift;
36 my $action = shift;
37 my $resource = shift;
38  
39 # Abstract rule denies everything. Do not use.
40  
41 return 1;
42  
43 }
44  
45 1;
46  
47 __END__