From 2e417becb2135774296dde286a8395751d909bfb Mon Sep 17 00:00:00 2001 From: GerhardPx Date: Wed, 13 Nov 2024 17:21:12 +0100 Subject: [PATCH 1/2] kopfdatenRepo overrided saveAll, testAuthorities dementsprechend angepasst --- .../domain/kopfdaten/KopfdatenRepository.java | 4 ++++ .../wahllokalsystem/basisdatenservice/utils/Authorities.java | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/domain/kopfdaten/KopfdatenRepository.java b/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/domain/kopfdaten/KopfdatenRepository.java index 91b7b2160..1619a964a 100644 --- a/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/domain/kopfdaten/KopfdatenRepository.java +++ b/wls-basisdaten-service/src/main/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/domain/kopfdaten/KopfdatenRepository.java @@ -28,6 +28,10 @@ public interface KopfdatenRepository extends CrudRepository S save(S kopfdaten); + @Override + @PreAuthorize("hasAuthority('Basisdaten_WRITE_Kopfdaten')") + Iterable saveAll(Iterable iterable); + @Override @CacheEvict(value = CACHE, key = "#p0") @PreAuthorize("hasAuthority('Basisdaten_DELETE_Kopfdaten')") diff --git a/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java b/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java index 62d598a3e..160a32a5b 100644 --- a/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java +++ b/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java @@ -80,7 +80,7 @@ public class Authorities { public static final String S2S_INFOMANAGEMENT_REPOSITORY_WRITE_KONFIGURIERTERWAHLTAG = "Infomanagement_WRITE_KonfigurierterWahltag"; public static final String S2S_INFOMANAGEMENT_REPOSITORY_DELETE_KONFIGURIERTERWAHLTAG = "Infomanagement_DELETE_KonfigurierterWahltag"; - public static final String[] ALL_AUTHORITIES_GET_WAHLVORSCHLAEGE = new String[] { + public static final String[] ALL_AUTHORITIES_GET_WAHLVORSCHLAEGE = new String[]{ SERVICE_GET_WAHLVORSCHLAEGE, REPOSITORY_READ_WAHLVORSCHLAEGE, REPOSITORY_WRITE_WAHLVORSCHLAEGE, @@ -208,7 +208,7 @@ public class Authorities { REPOSITORY_WRITE_WAHL, REPOSITORY_WRITE_WAHLBEZIRK, - REPOSITORY_READ_KOPFDATEN + REPOSITORY_WRITE_KOPFDATEN }; public static final String[] ALL_AUTHORITIES_PUT_WAHLTERMINDATEN_THAT_GOT_CATCHED_ON_MISSING = { From f995dd05560f7e00ea6e0ae8962f1aab69399d53 Mon Sep 17 00:00:00 2001 From: GerhardPx Date: Wed, 13 Nov 2024 17:32:00 +0100 Subject: [PATCH 2/2] spotless --- .../wahllokalsystem/basisdatenservice/utils/Authorities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java b/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java index 160a32a5b..d0901748b 100644 --- a/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java +++ b/wls-basisdaten-service/src/test/java/de/muenchen/oss/wahllokalsystem/basisdatenservice/utils/Authorities.java @@ -80,7 +80,7 @@ public class Authorities { public static final String S2S_INFOMANAGEMENT_REPOSITORY_WRITE_KONFIGURIERTERWAHLTAG = "Infomanagement_WRITE_KonfigurierterWahltag"; public static final String S2S_INFOMANAGEMENT_REPOSITORY_DELETE_KONFIGURIERTERWAHLTAG = "Infomanagement_DELETE_KonfigurierterWahltag"; - public static final String[] ALL_AUTHORITIES_GET_WAHLVORSCHLAEGE = new String[]{ + public static final String[] ALL_AUTHORITIES_GET_WAHLVORSCHLAEGE = new String[] { SERVICE_GET_WAHLVORSCHLAEGE, REPOSITORY_READ_WAHLVORSCHLAEGE, REPOSITORY_WRITE_WAHLVORSCHLAEGE,