diff --git a/src/main/kotlin/ch/uzh/ifi/access/service/RoleService.kt b/src/main/kotlin/ch/uzh/ifi/access/service/RoleService.kt index 6615b0e..9f81362 100644 --- a/src/main/kotlin/ch/uzh/ifi/access/service/RoleService.kt +++ b/src/main/kotlin/ch/uzh/ifi/access/service/RoleService.kt @@ -143,6 +143,7 @@ class RoleService( val role = accessRealm.roles()[Role.STUDENT.withCourse(course.slug)] val rolesToAdd = listOf(role.toRepresentation()) logger.debug { "B: updating roles for ${username} (roles to add: ${rolesToAdd})"} + logger.debug { "Searching if ${username} is in ${role.getUserMembers(0, -1).size} members of ${role} in keycloak" } role.getUserMembers(0, -1) .filter { studentMatchesUser(username, it) @@ -151,6 +152,7 @@ class RoleService( logger.debug { "B: removing ${rolesToAdd} from ${username}"} accessRealm.users()[it.id].roles().realmLevel().remove(rolesToAdd) } + logger.debug { "Comparing username to ${accessRealm.users().list(0, -1).size} users in keycloak" } accessRealm.users().list(0, -1).forEach { if (studentMatchesUser(username, it) && userRegisteredForCourse(it, registrationIDs)) { logger.debug { "B: adding roles ${rolesToAdd} to ${it.username}" }