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