chore: import DH V2 D5.6.4 production baseline

This commit is contained in:
DH V2
2026-09-05 10:12:35 -03:00
commit 82213e72f5
757 changed files with 84218 additions and 0 deletions
@@ -0,0 +1,17 @@
import { ForbiddenException } from '@nestjs/common';
import type { AuthPrincipal } from '../common/http/request-context';
export function assertMobileInspector(principal: AuthPrincipal): void {
if (principal.transport !== 'bearer') {
throw new ForbiddenException({
code: 'INSPECTION_MOBILE_APP_REQUIRED',
message: 'Esta operación sólo está disponible desde la aplicación móvil',
});
}
if (!principal.roles.includes('inspector')) {
throw new ForbiddenException({
code: 'INSPECTION_INSPECTOR_ROLE_REQUIRED',
message: 'Sólo un usuario con rol inspector puede realizar esta operación',
});
}
}