Skip to content

Commit

Permalink
debugging participation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sealexan committed Feb 22, 2024
1 parent 2063931 commit 98f79cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/ch/uzh/ifi/access/service/RoleService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}" }
Expand Down

0 comments on commit 98f79cb

Please sign in to comment.