mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Merge pull request #1307 from Tria-plc/alpha
fix: ( payments ) restrict force-confirm to tickets:generate permission
This commit is contained in:
@@ -218,17 +218,14 @@ export class PaymentsController {
|
||||
}
|
||||
|
||||
@Post(":bookingId/force-confirm")
|
||||
@PassengerStaff([
|
||||
PASSENGER_PERMS.payments.manage,
|
||||
PASSENGER_PERMS.payments.manageMethods,
|
||||
PASSENGER_PERMS.admin,
|
||||
])
|
||||
@PassengerStaff([PASSENGER_PERMS.tickets.generate, PASSENGER_PERMS.admin])
|
||||
@ApiBearerAuth("IAM-auth")
|
||||
@ApiOperation({
|
||||
summary: "Force-confirm payment & generate ticket (back-office only)",
|
||||
summary: "Force-confirm payment & generate ticket (ticket-generate permission)",
|
||||
description:
|
||||
"Marks the payment as SUCCEEDED, confirms the booking, and generates the ticket. " +
|
||||
"Use when a vendor payment completed but the webhook was never delivered. Idempotent.",
|
||||
"Use when a vendor payment completed but the webhook was never delivered. Idempotent. " +
|
||||
"Requires `edr_passenger_app:tickets:generate` (admins bypass).",
|
||||
})
|
||||
forceConfirm(
|
||||
@Param("bookingId") bookingId: string,
|
||||
|
||||
Reference in New Issue
Block a user