forked from fa/breadcrumb-the-shire
agent foundation
This commit is contained in:
@@ -218,6 +218,7 @@ class UserAssignmentService
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Incrementing authz_version causes the session to be re-checked on the user's next request.
|
||||
public function bumpAuthzVersion(int $userId): void
|
||||
{
|
||||
if ($userId <= 0) {
|
||||
@@ -237,6 +238,7 @@ class UserAssignmentService
|
||||
$this->databaseSessionRepository->beginTransaction();
|
||||
$transactionStarted = true;
|
||||
|
||||
// bumpAuthz=false on each sync — bump once at the end to avoid redundant DB writes.
|
||||
$ok = $this->syncTenants($userId, $tenantIds, false)
|
||||
&& $this->syncRoles($userId, $roleIds, false)
|
||||
&& $this->syncDepartments($userId, $departmentIds, false);
|
||||
@@ -258,6 +260,7 @@ class UserAssignmentService
|
||||
}
|
||||
}
|
||||
|
||||
// Accepts arrays, comma-separated strings, and nested arrays — normalizes to a flat list of IDs.
|
||||
public function normalizeIdInput($value): array
|
||||
{
|
||||
$raw = is_array($value) ? $value : [$value];
|
||||
|
||||
Reference in New Issue
Block a user