mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 19:28:51 +02:00
Fixed an exception when upgrading permissions schemas when the user has no group
This commit is contained in:
parent
ec9dcb7975
commit
b2157c93e3
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ class PermissionSchemaUpdater
|
|||
public function userUpgradeSchemaRecursively(User $user, int $target_version = PermissionData::CURRENT_SCHEMA_VERSION): bool
|
||||
{
|
||||
$updated = $this->upgradeSchema($user, $target_version);
|
||||
$updated = $this->groupUpgradeSchemaRecursively($user->getGroup(), $target_version) || $updated;
|
||||
if ($user->getGroup()) {
|
||||
$updated = $this->groupUpgradeSchemaRecursively($user->getGroup(), $target_version) || $updated;
|
||||
}
|
||||
|
||||
return $updated;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue