Merge pull request #911 from Tria-plc/freight_feature/usermanagement

changes
This commit is contained in:
marshal
2026-07-22 15:21:25 +03:00
committed by GitHub
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;