Total Complexity | 6 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
2 | class RoleAPI extends VolunteerAPI |
||
3 | { |
||
4 | use Processor; |
||
|
|||
5 | |||
6 | public function __construct() |
||
7 | { |
||
8 | parent::__construct('roles', 'short_name'); |
||
9 | } |
||
10 | |||
11 | protected function canEditDept($request, $deptId) |
||
12 | { |
||
13 | if($this->isVolunteerAdmin($request)) |
||
14 | { |
||
15 | return true; |
||
16 | } |
||
17 | return $this->isUserDepartmentLead($deptId, $this->user); |
||
18 | } |
||
19 | |||
20 | protected function canUpdate($request, $entity) |
||
23 | } |
||
24 | |||
25 | protected function canDelete($request, $entity) |
||
26 | { |
||
27 | return $this->canUpdate($request, $entity); |
||
28 | } |
||
29 | |||
30 | protected function processEntry($entry, $request) |
||
33 | } |
||
34 | } |
||
35 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |
||
36 |