You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: