Restrict booking list to non-agent roles
Some checks failed
build-and-deploy / build-deploy (push) Failing after 1m2s
Some checks failed
build-and-deploy / build-deploy (push) Failing after 1m2s
This commit is contained in:
@@ -136,7 +136,16 @@ class BookingFlow(
|
||||
@AuthenticationPrincipal principal: MyPrincipal?,
|
||||
@RequestParam(required = false) status: String?
|
||||
): List<BookingListItem> {
|
||||
requireMember(propertyAccess, propertyId, principal)
|
||||
requireRole(
|
||||
propertyAccess,
|
||||
propertyId,
|
||||
principal,
|
||||
Role.ADMIN,
|
||||
Role.MANAGER,
|
||||
Role.STAFF,
|
||||
Role.HOUSEKEEPING,
|
||||
Role.FINANCE
|
||||
)
|
||||
val statuses = parseStatuses(status)
|
||||
val bookings = if (statuses.isEmpty()) {
|
||||
bookingRepo.findByPropertyIdOrderByCreatedAtDesc(propertyId)
|
||||
|
||||
Reference in New Issue
Block a user