diff --git a/Account/Account.php b/Account/Account.php index 97aea5982..e5e85b2c0 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -266,6 +266,8 @@ class Account implements ArrayableInterface, \JsonSerializable */ public function hasPermission(int $permission, int $unit = null, string $app = null, int $module = null, int $type = null, $element = null, $component = null) : bool { + $app = isset($app) ? strtolower($app) : $app; + foreach($this->permissions as $p) { if(($p->getUnit() === $unit || $p->getUnit() === null) && ($p->getApp() === $app || $p->getApp() === null)