Require auth for room type write endpoints
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s

This commit is contained in:
androidlover5842
2026-01-28 04:54:38 +05:30
parent df351204ed
commit 35174aa7dc
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ class FirebaseAuthFilter(
} }
return path.matches(Regex("^/properties/[^/]+/rooms/[^/]+/images/[^/]+/file$")) return path.matches(Regex("^/properties/[^/]+/rooms/[^/]+/images/[^/]+/file$"))
|| path.matches(Regex("^/properties/[^/]+/rooms/[^/]+/images$")) || path.matches(Regex("^/properties/[^/]+/rooms/[^/]+/images$"))
|| path.matches(Regex("^/properties/[^/]+/room-types$")) || (path.matches(Regex("^/properties/[^/]+/room-types$")) && request.method.equals("GET", true))
|| path.matches(Regex("^/properties/[^/]+/room-types/[^/]+/images$")) || path.matches(Regex("^/properties/[^/]+/room-types/[^/]+/images$"))
|| (path == "/image-tags" && request.method.equals("GET", true)) || (path == "/image-tags" && request.method.equals("GET", true))
|| path == "/icons/png" || path == "/icons/png"

View File

@@ -28,7 +28,7 @@ class SecurityConfig(
it.requestMatchers("/", "/health", "/auth/**").permitAll() it.requestMatchers("/", "/health", "/auth/**").permitAll()
it.requestMatchers("/properties/*/rooms/*/images/*/file").permitAll() it.requestMatchers("/properties/*/rooms/*/images/*/file").permitAll()
it.requestMatchers("/properties/*/rooms/*/images").permitAll() it.requestMatchers("/properties/*/rooms/*/images").permitAll()
it.requestMatchers("/properties/*/room-types").permitAll() it.requestMatchers(org.springframework.http.HttpMethod.GET, "/properties/*/room-types").permitAll()
it.requestMatchers("/properties/*/room-types/*/images").permitAll() it.requestMatchers("/properties/*/room-types/*/images").permitAll()
it.requestMatchers(org.springframework.http.HttpMethod.GET, "/image-tags").permitAll() it.requestMatchers(org.springframework.http.HttpMethod.GET, "/image-tags").permitAll()
it.requestMatchers("/icons/png").permitAll() it.requestMatchers("/icons/png").permitAll()