Application/Model/RBAC.pm untested

filter: Statementstmt 0.0% 0 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 15 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package QBit::Application::Model::RBAC;
2 $QBit::Application::Model::RBAC::VERSION = '0.017';
3 use qbit;
4  
5 use base qw(QBit::Application::Model);
6  
7 __PACKAGE__->register_rights(
8 [
9 {
10 name => 'rbac',
11 description => sub {gettext('Rights for RBAC')},
12 rights => {
13 rbac_roles_view => d_gettext('Right to view list of roles'),
14 rbac_role_add => d_gettext('Right to add new role'),
15 rbac_user_role_set => d_gettext('Right to set role to user'),
16 rbac_revoke_roles => d_gettext('Right to revoke roles'),
17 rbac_assign_rigth_to_role => d_gettext('Right to assign right to role')
18 },
19 }
20 ]
21 );
22  
23 __PACKAGE__->abstract_methods(
24 qw(
25 get_roles
26 role_add
27 role_edit
28 set_roles_rights
29 set_user_role
30 get_roles_rights
31 get_cur_user_roles
32 revoke_roles
33 get_roles_by_rights
34 )
35 );
36  
37 TRUE;