From 43f256a34ea31febee089dc9dfe2afa9a4aa3d34 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Fri, 29 Nov 2024 08:51:47 +0100
Subject: [PATCH] OZG-7014 define registrierung path

Sub task: OZG-7225
---
 .../main/java/de/ozgcloud/fachstelle/SecurityConfiguration.java | 2 +-
 .../registration/FachstelleRegistrationController.java          | 2 +-
 .../registration/FachstelleRegistrationControllerITCase.java    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/SecurityConfiguration.java b/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/SecurityConfiguration.java
index e92cda6..3d5de28 100644
--- a/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/SecurityConfiguration.java
+++ b/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/SecurityConfiguration.java
@@ -61,7 +61,7 @@ public class SecurityConfiguration {
 	public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
 		http
 				.authorizeHttpRequests(authorize -> authorize
-						.requestMatchers("/*", "/index**", "/success", "/actuator/**", "/error", "/favicon.ico", "/fonts/**", "/webjars/**",
+						.requestMatchers("/registrierung","/*", "/index**", "/success", "/actuator/**", "/error", "/favicon.ico", "/fonts/**", "/webjars/**",
 								"/api/environment")
 						.permitAll()
 						.requestMatchers("/api", "/api/**", "/preregister", "/register").authenticated()
diff --git a/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationController.java b/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationController.java
index a3dd948..5c70ac9 100644
--- a/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationController.java
+++ b/fachstelle-server/src/main/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationController.java
@@ -31,7 +31,7 @@ public class FachstelleRegistrationController {
 	private final FachstellenProperties properties;
 	private final FachstelleRegistrationService registrationService;
 
-	@GetMapping(produces = "text/html; charset=utf-8")
+	@GetMapping(value = "/registrierung", produces = "text/html; charset=utf-8")
 	public String startRegistration(final Model model) {
 		model.addAttribute("loginUrl", properties.getLoginRedirectUrl());
 		return "index";
diff --git a/fachstelle-server/src/test/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationControllerITCase.java b/fachstelle-server/src/test/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationControllerITCase.java
index 610ff2c..66fde07 100644
--- a/fachstelle-server/src/test/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationControllerITCase.java
+++ b/fachstelle-server/src/test/java/de/ozgcloud/fachstelle/registration/FachstelleRegistrationControllerITCase.java
@@ -38,7 +38,7 @@ class FachstelleRegistrationControllerITCase {
 
 	@Test
 	void whenCallIndexPage_ThenReturnPage() throws Exception {
-		mockMvc.perform(MockMvcRequestBuilders.get("")
+		mockMvc.perform(MockMvcRequestBuilders.get("/registrierung")
 						.header("Accept-Language", "de"))
 				.andExpect(status().isOk())
 				.andExpect(content().string(containsString("Registrierung als Fachstelle")));
-- 
GitLab