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

@@ -251,7 +251,8 @@ class UserCustomFieldValueService
}
$tenantIds = self::normalizeTenantIds($tenantIds);
// Always clean values that belong to tenants no longer assigned to the user.
// Always clean values for tenants no longer assigned — happens even when !$canEdit,
// because orphaned custom field data should not persist after tenant reassignment.
if (!UserCustomFieldValueRepository::deleteByUserOutsideTenantIds($userId, $tenantIds)) {
return ['ok' => false, 'errors' => [t('Custom field values can not be saved')]];
}
@@ -454,6 +455,7 @@ class UserCustomFieldValueService
continue;
}
// URL key prefixes: cf_ = single-value (select/boolean), cfm_ = multiselect, cfd_ = date range.
if (preg_match('/^cf_([a-f0-9-]{36})$/', $key, $match)) {
$uuid = $match[1];
$definition = $definitionMapByUuid[$uuid] ?? null;