Browse Source

fix: correction in global auth guard

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
041023aa2b
  1. 3
      packages/nocodb-nest/src/guards/global/global.guard.ts
  2. 4
      packages/nocodb-nest/src/modules/users/users.controller.ts

3
packages/nocodb-nest/src/guards/global/global.guard.ts

@ -35,6 +35,9 @@ export class GlobalGuard extends AuthGuard(['jwt']) {
}); });
} }
} }
if(result) return true;
if (req.headers['xc-token']) { if (req.headers['xc-token']) {
let canActivate = false; let canActivate = false;
try { try {

4
packages/nocodb-nest/src/modules/users/users.controller.ts

@ -9,10 +9,10 @@ import {
Request, Request,
Response, Response,
UseGuards, UseGuards,
} from '@nestjs/common' } from '@nestjs/common';
import * as ejs from 'ejs'; import * as ejs from 'ejs';
import { AuthGuard } from '@nestjs/passport'; import { AuthGuard } from '@nestjs/passport';
import { GlobalGuard } from '../../guards/global/global.guard' import { GlobalGuard } from '../../guards/global/global.guard';
import { NcError } from '../../helpers/catchError'; import { NcError } from '../../helpers/catchError';
import { import {
Acl, Acl,

Loading…
Cancel
Save