Crop/Rights/Role.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 1 SCAR 6.9
CC
1
Cov
0%
Table
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Crop::Rights::Role;
2 use base qw/ Crop::Object::Simple /;
3  
4 =begin nd
5 Class: Crop::Rights::Realm
6 Object the rights are linked to.
7
8 The Role is presented by a Class name.
9 =cut
10  
11 use v5.14;
12 use warnings;
13  
14 =begin nd
15 Variable: our %Attributes
16 Class attributes:
17  
18 active - role is off
19 description - description
20 id - id from <Crop::Object::Simple>
21 name - name
22 privileges - Collection of granted privileges
23 =cut
24 our %Attributes = (
25 active => undef,
26 description => undef,
27 name => {mode => 'read'},
28 privileges => {mode => 'read', type => 'cache'},
29 EXT => {
30 privileges => {
31 type => 'content',
32 cross => [
33 'Crop::Rights::Granted' => {id => 'id_role'},
34 'Crop::Rights::Privilege' => {id_realm => 'id_realm', id_perm => 'id_perm'}
35 ],
36 view => 'privileges',
37 }
38 }
39 );
40  
41 =begin nd
42 Method: Table ( )
43 Table in Warehouse.
44  
45 Returns:
46 'role' string
47 =cut
48 sub Table { 'role' }
49  
50 1;