Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 81.82% |
Changes | 4 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
18 | trait AclControllerTrait { |
||
19 | public abstract function _getRole(); |
||
20 | |||
21 | /** |
||
22 | * Returns True if access to the controller is allowed for $role. |
||
23 | * |
||
24 | * @param string $action |
||
25 | * @param string $role |
||
26 | * @return boolean |
||
27 | */ |
||
28 | 1 | protected function isValidRole($action,$role) { |
|
42 | } |
||
43 | /** |
||
44 | * Returns True if access to the controller is allowed for the role returned by _getRole method. |
||
45 | * To be override in sub classes |
||
46 | * |
||
47 | * @param string $action |
||
48 | * @return boolean |
||
49 | */ |
||
50 | 1 | public function isValid($action) { |
|
55 |