Skip to content

Commit 24e6eb9

Browse files
committed
Remove retryable.
Skip second ytelse access check in system context.
1 parent 724ca23 commit 24e6eb9

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/main/kotlin/no/nav/klage/oppgave/service/BehandlingService.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ class BehandlingService(
667667
if (tildeltSaksbehandlerIdent != null) {
668668
//Denne sjekken gjøres kun når det er en tildeling:
669669

670-
checkYtelseAccess(tildeltSaksbehandlerIdent = tildeltSaksbehandlerIdent, behandling = behandling)
670+
if (!systemUserContext) {
671+
checkYtelseAccess(tildeltSaksbehandlerIdent = tildeltSaksbehandlerIdent, behandling = behandling)
672+
}
671673

672674
//if fagsystem is Infotrygd also do this.
673675
if (behandling.shouldUpdateInfotrygd()) {

src/main/kotlin/no/nav/klage/oppgave/service/ExternalMottakFacade.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class ExternalMottakFacade(
8484
saksbehandlerIdent = saksbehandlerIdent,
8585
)
8686
} catch (e: Exception) {
87+
logger.error("Klarte ikke å tildele behandling ${behandling.id} til saksbehandlerIdent $saksbehandlerIdent. Feil: $e")
8788
mottakService.createTaskForMerkantil(
8889
behandlingId = behandling.id,
8990
reason = "Klarte ikke å tildele behandling ${behandling.id} til saksbehandlerIdent $saksbehandlerIdent. Feilmelding: ${e.message}"
@@ -149,6 +150,4 @@ class ExternalMottakFacade(
149150
systemUserContext = true,
150151
)
151152
}
152-
153-
154153
}

src/main/kotlin/no/nav/klage/oppgave/service/KabalInnstillingerService.kt

-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ import no.nav.klage.kodeverk.Ytelse
44
import no.nav.klage.oppgave.clients.kabalinnstillinger.KabalInnstillingerClient
55
import no.nav.klage.oppgave.clients.kabalinnstillinger.model.*
66
import no.nav.klage.oppgave.domain.klage.Behandling
7-
import org.springframework.retry.annotation.Retryable
87
import org.springframework.stereotype.Service
98

109
@Service
1110
class KabalInnstillingerService(
1211
private val kabalInnstillingerClient: KabalInnstillingerClient,
1312
) {
14-
@Retryable
1513
fun getPotentialSaksbehandlere(behandling: Behandling): Saksbehandlere {
1614
return kabalInnstillingerClient.searchSaksbehandlere(
1715
SaksbehandlerSearchInput(
@@ -21,7 +19,6 @@ class KabalInnstillingerService(
2119
)
2220
}
2321

24-
@Retryable
2522
fun getPotentialMedunderskrivere(behandling: Behandling): Medunderskrivere {
2623
if (behandling.tildeling == null) {
2724
return Medunderskrivere(medunderskrivere = emptyList())
@@ -36,7 +33,6 @@ class KabalInnstillingerService(
3633
)
3734
}
3835

39-
@Retryable
4036
fun getPotentialROL(behandling: Behandling): Saksbehandlere {
4137
return kabalInnstillingerClient.searchROL(
4238
ROLSearchInput(
@@ -46,14 +42,12 @@ class KabalInnstillingerService(
4642
}
4743

4844
//TODO: Bør vi ha et cache her? Kan være et problem om leder gir nye tilganger, kanskje et kortere cache?
49-
@Retryable
5045
fun getTildelteYtelserForSaksbehandler(navIdent: String): List<Ytelse> {
5146
return kabalInnstillingerClient.getSaksbehandlersTildelteYtelser(navIdent).ytelseIdList.map {
5247
Ytelse.of(it)
5348
}
5449
}
5550

56-
@Retryable
5751
fun getTildelteYtelserForEnhet(enhet: String): Set<Ytelse> {
5852
return kabalInnstillingerClient.getTildelteYtelserForEnhet(enhet).ytelseIdList.map {
5953
Ytelse.of(it)

0 commit comments

Comments
 (0)