Fix incorrect permission check when check_var is set but mid is not

This commit is contained in:
Kijin Sung 2025-06-16 23:36:32 +09:00
parent ad6aeb4c00
commit 5e9cf872e7
2 changed files with 29 additions and 9 deletions

View file

@ -103,7 +103,11 @@ class Permission
// Check if each permission is granted to the current user.
foreach ($this->_spec as $key => $requirement)
{
if ($requirement === 'guest')
if ($key === 'manager' && $this->manager)
{
continue;
}
elseif ($requirement === 'guest')
{
$this->{$key} = true;
}