Allow public image tag list
Some checks failed
build-and-deploy / build-deploy (push) Has been cancelled
Some checks failed
build-and-deploy / build-deploy (push) Has been cancelled
This commit is contained in:
@@ -33,7 +33,6 @@ class RoomImageTags(
|
|||||||
fun listTags(
|
fun listTags(
|
||||||
@AuthenticationPrincipal principal: MyPrincipal?
|
@AuthenticationPrincipal principal: MyPrincipal?
|
||||||
): List<RoomImageTagResponse> {
|
): List<RoomImageTagResponse> {
|
||||||
requirePrincipal(principal)
|
|
||||||
return roomImageTagRepo.findAllByOrderByName().map { it.toResponse() }
|
return roomImageTagRepo.findAllByOrderByName().map { it.toResponse() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class FirebaseAuthFilter(
|
|||||||
}
|
}
|
||||||
return path.matches(Regex("^/properties/[^/]+/rooms/[^/]+/images/[^/]+/file$"))
|
return path.matches(Regex("^/properties/[^/]+/rooms/[^/]+/images/[^/]+/file$"))
|
||||||
|| path.matches(Regex("^/properties/[^/]+/room-types$"))
|
|| path.matches(Regex("^/properties/[^/]+/room-types$"))
|
||||||
|
|| path == "/image-tags"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun doFilterInternal(
|
override fun doFilterInternal(
|
||||||
|
|||||||
@@ -28,6 +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/*/room-types").permitAll()
|
it.requestMatchers("/properties/*/room-types").permitAll()
|
||||||
|
it.requestMatchers("/image-tags").permitAll()
|
||||||
it.anyRequest().authenticated()
|
it.anyRequest().authenticated()
|
||||||
}
|
}
|
||||||
.exceptionHandling {
|
.exceptionHandling {
|
||||||
|
|||||||
Reference in New Issue
Block a user