Skip to content

Commit

Permalink
chore: add group list size in error message when brreg login fails
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsOveTen committed Sep 18, 2023
1 parent c3d1251 commit 21d0046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/no/fdk/userapi/service/BRREGService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BRREGService(
val role = when {
groups.contains(brregProperties.adminGroupID) -> RoleFDK.Role.Admin
groups.contains(brregProperties.writeGroupID) -> RoleFDK.Role.Write
else -> throw Exception("unauthorized brreg login")
else -> throw Exception("Unauthorized brreg login, user is member of ${groups.size} groups")

Check warning on line 16 in src/main/kotlin/no/fdk/userapi/service/BRREGService.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/no/fdk/userapi/service/BRREGService.kt#L16

Added line #L16 was not covered by tests
}
return RoleFDK(
RoleFDK.ResourceType.Organization,
Expand Down

0 comments on commit 21d0046

Please sign in to comment.