fixes
All checks were successful
Build And Push Image / docker (push) Successful in 1m26s

This commit is contained in:
2025-08-13 22:43:40 +02:00
parent 44aee8f2f9
commit fc1d691950
3 changed files with 126 additions and 4 deletions

View File

@@ -778,7 +778,9 @@ export class KeycloakAdminClient {
const alreadyInNewGroup = primaryGroups.some(g => g.name === newGroupName);
if (!alreadyInNewGroup) {
console.log(`[keycloak-admin] Adding user to new group: ${newGroupName}`);
const newGroupId = await this.getGroupByPath(newGroupName);
const newGroupPath = `/${newGroupName}`; // Keycloak groups use path format with leading slash
console.log(`[keycloak-admin] Looking up group with path: ${newGroupPath}`);
const newGroupId = await this.getGroupByPath(newGroupPath);
await this.assignUserToGroup(userId, newGroupId);
} else {
console.log(`[keycloak-admin] User already in target group: ${newGroupName}`);