mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 22:18:40 +00:00
Allow to accept from all (e.g. units etc.)
This commit is contained in:
parent
8d7e7da54f
commit
014c1ec311
|
|
@ -269,12 +269,12 @@ class Account implements ArrayableInterface, \JsonSerializable
|
||||||
$app = isset($app) ? strtolower($app) : $app;
|
$app = isset($app) ? strtolower($app) : $app;
|
||||||
|
|
||||||
foreach($this->permissions as $p) {
|
foreach($this->permissions as $p) {
|
||||||
if(($p->getUnit() === $unit || $p->getUnit() === null)
|
if(($p->getUnit() === $unit || $p->getUnit() === null || !isset($unit))
|
||||||
&& ($p->getApp() === $app || $p->getApp() === null)
|
&& ($p->getApp() === $app || $p->getApp() === null || !isset($app))
|
||||||
&& ($p->getModule() === $module || $p->getModule() === null)
|
&& ($p->getModule() === $module || $p->getModule() === null || !isset($module))
|
||||||
&& ($p->getType() === $type || $p->getType() === null)
|
&& ($p->getType() === $type || $p->getType() === null || !isset($type))
|
||||||
&& ($p->getElement() === $element || $p->getElement() === null)
|
&& ($p->getElement() === $element || $p->getElement() === null || !isset($element))
|
||||||
&& ($p->getComponent() === $component || $p->getComponent() === null)
|
&& ($p->getComponent() === $component || $p->getComponent() === null || !isset($component))
|
||||||
&& ($p->getPermission() | $permission) === $p->getPermission()) {
|
&& ($p->getPermission() | $permission) === $p->getPermission()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user