Allow public access to room image files endpoint
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
This commit is contained in:
@@ -130,8 +130,9 @@ class RoomImages(
|
||||
@RequestParam(required = false, defaultValue = "full") size: String,
|
||||
@AuthenticationPrincipal principal: MyPrincipal?
|
||||
): ResponseEntity<FileSystemResource> {
|
||||
requirePrincipal(principal)
|
||||
propertyAccess.requireMember(propertyId, principal!!.userId)
|
||||
if (principal != null) {
|
||||
propertyAccess.requireMember(propertyId, principal.userId)
|
||||
}
|
||||
ensureRoom(propertyId, roomId)
|
||||
|
||||
val image = roomImageRepo.findByIdAndRoomIdAndPropertyId(imageId, roomId, propertyId)
|
||||
|
||||
Reference in New Issue
Block a user