agent foundation

This commit is contained in:
2026-03-06 00:44:52 +01:00
parent 9819cba733
commit 9a08f96c11
199 changed files with 8522 additions and 1880 deletions

View File

@@ -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];