public function restrictWithPermissions($permissions, $uri = null)
{
$this->setupAuthClasses();
if ($this->authenticate->check() && $this->authorize->hasPermission($permissions, $this->authenticate->id())) {
return true;
}
//rest of the code goes here ...
}
FlatAuthorization.php file
public function hasPermission($permission, int $userId)
{
if (empty($permission) || (! is_string($permission) && ! is_numeric($permission))) {
return null;
}
if (empty($userId) || ! is_numeric($userId)) {
return null;
}
// Get the Permission ID
$permissionId = $this->getPermissionID($permission);
//rest of the code goes here ...
}
As we can see there is no code to check if passed $permission variable is array or not. So if we pass array as value with more than one permissions, code will return always null
AuthTrait.php file
FlatAuthorization.php file
As we can see there is no code to check if passed $permission variable is array or not. So if we pass array as value with more than one permissions, code will return always null