mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +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")
|
@Post(":bookingId/force-confirm")
|
||||||
@PassengerStaff([
|
@PassengerStaff([PASSENGER_PERMS.tickets.generate, PASSENGER_PERMS.admin])
|
||||||
PASSENGER_PERMS.payments.manage,
|
|
||||||
PASSENGER_PERMS.payments.manageMethods,
|
|
||||||
PASSENGER_PERMS.admin,
|
|
||||||
])
|
|
||||||
@ApiBearerAuth("IAM-auth")
|
@ApiBearerAuth("IAM-auth")
|
||||||
@ApiOperation({
|
@ApiOperation({
|
||||||
summary: "Force-confirm payment & generate ticket (back-office only)",
|
summary: "Force-confirm payment & generate ticket (ticket-generate permission)",
|
||||||
description:
|
description:
|
||||||
"Marks the payment as SUCCEEDED, confirms the booking, and generates the ticket. " +
|
"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(
|
forceConfirm(
|
||||||
@Param("bookingId") bookingId: string,
|
@Param("bookingId") bookingId: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user