This commit is contained in:
Marshal
2026-07-22 12:19:51 +00:00
parent 2aa405d8e4
commit 410bfa5b2b
3 changed files with 24 additions and 10 deletions

View File

@@ -196,7 +196,10 @@ export class ContractsController {
@CurrentUser() user: TCurrentUser,
) {
// Staff see every contract; customers are force-scoped to their own company.
if (hasFreightPermission(user, FREIGHT_PERMS.bookings.view)) {
if (
hasFreightPermission(user, FREIGHT_PERMS.bookings.view) ||
hasFreightPermission(user, FREIGHT_PERMS.contracts.view)
) {
return this.contractsService.findAll(filter);
}
const userId = user?.id;