Browse Source

fix: correction in global auth guard

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 1 year 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']) {
let canActivate = false;
try {

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

@ -9,10 +9,10 @@ import {
Request,
Response,
UseGuards,
} from '@nestjs/common'
} from '@nestjs/common';
import * as ejs from 'ejs';
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 {
Acl,

Loading…
Cancel
Save