mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 18:55:42 +00:00
feat: ( permissions ) add permssions for master data
This commit is contained in:
@@ -55,7 +55,11 @@ export class PaymentsController {
|
||||
}
|
||||
|
||||
@Get("all")
|
||||
@PassengerStaff([PASSENGER_PERMS.payments.viewAll, PASSENGER_PERMS.admin])
|
||||
@PassengerStaff([
|
||||
PASSENGER_PERMS.payments.view,
|
||||
PASSENGER_PERMS.payments.viewAll,
|
||||
PASSENGER_PERMS.admin,
|
||||
])
|
||||
@ApiBearerAuth("IAM-auth")
|
||||
@ApiOperation({ summary: "Get all payments with filters (staff/admin only)" })
|
||||
@ApiQuery({ name: "search", required: false })
|
||||
@@ -146,7 +150,11 @@ export class PaymentsController {
|
||||
}
|
||||
|
||||
@Post("refund")
|
||||
@PassengerStaff([PASSENGER_PERMS.payments.refund, PASSENGER_PERMS.admin])
|
||||
@PassengerStaff([
|
||||
PASSENGER_PERMS.payments.manage,
|
||||
PASSENGER_PERMS.payments.refund,
|
||||
PASSENGER_PERMS.admin,
|
||||
])
|
||||
@ApiBearerAuth("IAM-auth")
|
||||
@ApiOperation({ summary: "Refund a confirmed booking (staff/agent only)" })
|
||||
refund(@Body() dto: RefundDto) {
|
||||
@@ -155,6 +163,7 @@ export class PaymentsController {
|
||||
|
||||
@Post(":bookingId/force-confirm")
|
||||
@PassengerStaff([
|
||||
PASSENGER_PERMS.payments.manage,
|
||||
PASSENGER_PERMS.payments.manageMethods,
|
||||
PASSENGER_PERMS.admin,
|
||||
])
|
||||
@@ -174,6 +183,7 @@ export class PaymentsController {
|
||||
|
||||
@Post("methods")
|
||||
@PassengerStaff([
|
||||
PASSENGER_PERMS.paymentMethods.manage,
|
||||
PASSENGER_PERMS.payments.manageMethods,
|
||||
PASSENGER_PERMS.admin,
|
||||
])
|
||||
@@ -187,6 +197,7 @@ export class PaymentsController {
|
||||
|
||||
@Patch("methods/:id")
|
||||
@PassengerStaff([
|
||||
PASSENGER_PERMS.paymentMethods.manage,
|
||||
PASSENGER_PERMS.payments.manageMethods,
|
||||
PASSENGER_PERMS.admin,
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user