diff --git a/src/authentication/authentication.guard.ts b/src/authentication/authentication.guard.ts index a41bc74..108dce8 100644 --- a/src/authentication/authentication.guard.ts +++ b/src/authentication/authentication.guard.ts @@ -115,16 +115,16 @@ export class AuthenticationGuard } // Bloquear outros customer de usar o maestor dedicado - const DEDICATED_PROXY = process.env.DEDICATED_PROXY + const DEDICATED_PROXY = process.env.DEDICATED_PROXY || ''; if (DEDICATED_PROXY !== '' && DEDICATED_PROXY !== accessTokenPayload.customer_id) { - throw new ForbiddenException(); + throw new ErrorBuilder(ErrorCodes.AUTH.FORBIDDEN); } // Bloquear o customer de acesso o maestro publico - const hasNetworkPolicyModule = accessTokenPayload.customer_modules.includes('network-policy'); - if (hasNetworkPolicyModule && DEDICATED_PROXY === '') { - throw new ForbiddenException(); - } + // const hasNetworkPolicyModule = accessTokenPayload.customer_modules.includes('network-policy'); + // if (hasNetworkPolicyModule && DEDICATED_PROXY === '') { + // throw new ForbiddenException(); + // } request.accessTokenPayload = accessTokenPayload; request.user = {