mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +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';
|
$all_permission = $parts[0].'_all';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//empty $all_permissions leads to stripos returning true;
|
||||||
|
|
||||||
return $this->isOwner() ||
|
return $this->isOwner() ||
|
||||||
$this->isAdmin() ||
|
$this->isAdmin() ||
|
||||||
(is_int(stripos($this->token()->cu->permissions, $all_permission))) ||
|
(is_int(stripos($this->token()->cu->permissions, $all_permission))) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user