mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 06:28:40 +00:00
Added has permission function
This commit is contained in:
parent
810e7644d9
commit
770cb56f7b
|
|
@ -333,4 +333,18 @@ abstract class PermissionAbstract
|
||||||
{
|
{
|
||||||
$this->permission |= $permission;
|
$this->permission |= $permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has permission.
|
||||||
|
*
|
||||||
|
* @param int $permission Permission
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function hasPermission(int $permission) : bool
|
||||||
|
{
|
||||||
|
return ($this->permission | $permission) === $this->permission;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user