mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Tests around hasPermission
This commit is contained in:
parent
c1563c571d
commit
0ae2260951
@ -365,6 +365,8 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
$all_permission = $parts[0].'_all';
|
||||
}
|
||||
|
||||
//empty $all_permissions leads to stripos returning true;
|
||||
|
||||
return $this->isOwner() ||
|
||||
$this->isAdmin() ||
|
||||
(is_int(stripos($this->token()->cu->permissions, $all_permission))) ||
|
||||
|
Loading…
Reference in New Issue
Block a user