Skip to content

Commit 4609346

Browse files
authored
Merge pull request #1388 from navikt/vedlegg_referanse
Missing hasAccess props.
2 parents 2128f46 + e7be059 commit 4609346

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

src/main/kotlin/no/nav/klage/dokument/api/mapper/DokumentMapper.kt

+2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class DokumentMapper(
132132
journalpostId = unproxiedDUA.journalpostId,
133133
dokumentInfoId = unproxiedDUA.dokumentInfoId,
134134
harTilgangTilArkivvariant = harTilgangTilArkivvariant(dokument),
135+
hasAccess = harTilgangTilArkivvariant(dokument),
135136
datoOpprettet = unproxiedDUA.opprettet,
136137
sortKey = unproxiedDUA.sortKey!!
137138
)
@@ -437,6 +438,7 @@ class DokumentMapper(
437438
tittel = vedlegg.tittel,
438439
dokumentInfoId = vedlegg.dokumentInfoId,
439440
harTilgangTilArkivvariant = harTilgangTilArkivvariant(vedlegg),
441+
hasAccess = harTilgangTilArkivvariant(vedlegg),
440442
valgt = saksdokumenter.containsDokument(
441443
journalpost.journalpostId,
442444
vedlegg.dokumentInfoId

src/main/kotlin/no/nav/klage/dokument/api/view/DokumentUnderArbeidView.kt

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ data class DokumentView(
6262
val journalpostId: String,
6363
val dokumentInfoId: String,
6464
val harTilgangTilArkivvariant: Boolean,
65+
val hasAccess: Boolean,
6566
val datoOpprettet: LocalDateTime,
6667
val sortKey: String,
6768
)

src/main/kotlin/no/nav/klage/dokument/service/FerdigstillDokumentService.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ class FerdigstillDokumentService(
102102
harTilgangTilArkivvariant = true,
103103
hasAccess = true,
104104
vedlegg = it.vedlegg.map { vedlegg ->
105-
vedlegg.copy(harTilgangTilArkivvariant = true)
105+
vedlegg.copy(
106+
harTilgangTilArkivvariant = true,
107+
hasAccess = true,
108+
)
106109
}.toMutableList()
107110
)
108111
},

src/main/kotlin/no/nav/klage/oppgave/api/view/DokumentView.kt

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ data class DokumentReferanse(
113113
val dokumentInfoId: String,
114114
val tittel: String?,
115115
val harTilgangTilArkivvariant: Boolean,
116+
val hasAccess: Boolean,
116117
val valgt: Boolean,
117118
val originalJournalpostId: String?,
118119
val sortKey: String,
@@ -197,6 +198,7 @@ data class JournalfoertDokumentMetadata(
197198
val dokumentInfoId: String,
198199
val title: String,
199200
val harTilgangTilArkivvariant: Boolean,
201+
val hasAccess: Boolean,
200202
)
201203

202204
data class DokumentUnderArbeidMetadata(

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ class DokumentService(
194194
dokumentInfoId = dokumentInfoId,
195195
title = dokumentInfo?.tittel
196196
?: throw RuntimeException("Document/title not found in Dokarkiv"),
197-
harTilgangTilArkivvariant = dokumentMapper.harTilgangTilArkivvariant(dokumentInfo)
197+
harTilgangTilArkivvariant = dokumentMapper.harTilgangTilArkivvariant(dokumentInfo),
198+
hasAccess = dokumentMapper.harTilgangTilArkivvariant(dokumentInfo)
198199
)
199200
}
200201

0 commit comments

Comments
 (0)