Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 2 | public function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null) |
|
31 | { |
||
32 | 2 | $currentUser = User::getCurrent(); |
|
33 | 2 | if ($currentUser && $currentUser->getStatus() === User::STATUS_ACTIVE) { |
|
34 | 2 | return true; |
|
35 | } |
||
36 | |||
37 | return $acl->reject('the current user is not active'); |
||
|
|||
38 | } |
||
40 |