Require auth for image tag changes
All checks were successful
build-and-deploy / build-deploy (push) Successful in 33s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 33s
This commit is contained in:
@@ -28,7 +28,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$"))
|
||||||
|| path == "/image-tags"
|
|| (path == "/image-tags" && request.method.equals("GET", true))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doFilterInternal(
|
override fun doFilterInternal(
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class SecurityConfig(
|
|||||||
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("/properties/*/room-types").permitAll()
|
||||||
it.requestMatchers("/image-tags").permitAll()
|
it.requestMatchers(org.springframework.http.HttpMethod.GET, "/image-tags").permitAll()
|
||||||
it.anyRequest().authenticated()
|
it.anyRequest().authenticated()
|
||||||
}
|
}
|
||||||
.exceptionHandling {
|
.exceptionHandling {
|
||||||
|
|||||||
Reference in New Issue
Block a user