fix: add collector role to API endpoints for mobile dashboard access
Collector users were blocked from ticket, payment, invoice, and client endpoints requiring 'technician' role. Added 'collector' to @Roles decorators and the COLLECTOR role to the shared role hierarchy.
This commit is contained in:
@@ -20,7 +20,7 @@ export class InvoiceController {
|
||||
constructor(private readonly invoiceService: InvoiceService) {}
|
||||
|
||||
@Get()
|
||||
@Roles('technician')
|
||||
@Roles('technician', 'collector')
|
||||
async findAll(
|
||||
@CurrentUser() user: CurrentUserPayload,
|
||||
@Query('clientId') clientId?: string,
|
||||
@@ -30,7 +30,7 @@ export class InvoiceController {
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@Roles('technician')
|
||||
@Roles('technician', 'collector')
|
||||
async findById(
|
||||
@CurrentUser() user: CurrentUserPayload,
|
||||
@Param('id') id: string,
|
||||
|
||||
Reference in New Issue
Block a user