diff --git a/src/authentication/authentication.guard.ts b/src/authentication/authentication.guard.ts index 108dce8..09f4845 100644 --- a/src/authentication/authentication.guard.ts +++ b/src/authentication/authentication.guard.ts @@ -121,10 +121,10 @@ export class AuthenticationGuard } // 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(ErrorCodes.AUTH.FORBIDDEN); + } request.accessTokenPayload = accessTokenPayload; request.user = {