Skip to content

Commit

Permalink
Vil logger roller så jeg kan debugge hvorfor kall feiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
ma10s committed Jan 11, 2024
1 parent e4fd14c commit 565de19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ object SikkerhetContext {
}

fun harRolle(rolleId: String): Boolean {

secureLogger.info("Sjekker rolleId: $rolleId mot roller: ${hentGrupperFraToken()}")

return hentGrupperFraToken().contains(rolleId)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class TilgangService(
return SikkerhetContext.harTilgangTilGittRolle(rolleConfig, minimumsrolle)
}

fun harForvalterrolle(): Boolean = SikkerhetContext.harRolle(rolleConfig.forvalter)
fun harForvalterrolle() = SikkerhetContext.harRolle(rolleConfig.forvalter)

fun harEgenAnsattRolle(): Boolean =
hentGrupperFraToken().contains(rolleConfig.egenAnsatt)
Expand Down

0 comments on commit 565de19

Please sign in to comment.