Require auth for room image uploads
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -26,7 +26,7 @@ class FirebaseAuthFilter(
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
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$")) && request.method.equals("GET", true))
|
||||||
|| (path.matches(Regex("^/properties/[^/]+/room-types$")) && request.method.equals("GET", true))
|
|| (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))
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class SecurityConfig(
|
|||||||
.authorizeHttpRequests {
|
.authorizeHttpRequests {
|
||||||
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(org.springframework.http.HttpMethod.GET, "/properties/*/rooms/*/images").permitAll()
|
||||||
it.requestMatchers(org.springframework.http.HttpMethod.GET, "/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()
|
||||||
|
|||||||
Reference in New Issue
Block a user