diff --git a/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts b/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts index 1ced1982cd..4774a6ef8a 100644 --- a/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts +++ b/packages/nocodb-nest/src/modules/attachments/attachments.controller.ts @@ -19,6 +19,7 @@ import { } from '@nestjs/platform-express'; import { AuthGuard } from '@nestjs/passport'; import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants'; +import { GlobalGuard } from '../../guards/global/global.guard' import { UploadAllowedInterceptor } from '../../interceptors/is-upload-allowed/is-upload-allowed.interceptor'; import { AttachmentsService } from './attachments.service'; @@ -26,7 +27,7 @@ import { AttachmentsService } from './attachments.service'; export class AttachmentsController { constructor(private readonly attachmentsService: AttachmentsService) {} - @UseGuards(AuthGuard('jwt')) + @UseGuards(GlobalGuard) @Post( '/api/v1/db/storage/upload', // multer({ @@ -78,7 +79,7 @@ export class AttachmentsController { // catchError(uploadViaURL), // ] // ); - @UseGuards(AuthGuard('jwt')) + @UseGuards(GlobalGuard) async uploadViaURL(@Body() body: any, @Query('path') path: string) { const attachments = await this.attachmentsService.uploadViaURL({ urls: body, diff --git a/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts b/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts index 905ef486a2..2e78052a20 100644 --- a/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts +++ b/packages/nocodb-nest/src/modules/datas/data-alias-nested/data-alias-nested.controller.ts @@ -8,6 +8,7 @@ import { UseGuards, } from '@nestjs/common' import { AuthGuard } from '@nestjs/passport'; +import { GlobalGuard } from '../../../guards/global/global.guard' import { Acl, ExtractProjectIdMiddleware, @@ -15,7 +16,7 @@ import { import { DataAliasNestedService } from './data-alias-nested.service'; @Controller() -@UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt')) +@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) export class DataAliasNestedController { constructor(private dataAliasNestedService: DataAliasNestedService) {} diff --git a/packages/nocodb-nest/src/modules/datas/data-alias.controller.ts b/packages/nocodb-nest/src/modules/datas/data-alias.controller.ts index 7d677e7023..a4df5e9000 100644 --- a/packages/nocodb-nest/src/modules/datas/data-alias.controller.ts +++ b/packages/nocodb-nest/src/modules/datas/data-alias.controller.ts @@ -12,6 +12,7 @@ import { UseGuards, } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; +import { GlobalGuard } from '../../guards/global/global.guard' import { parseHrtimeToSeconds } from '../../helpers'; import { Acl, @@ -20,7 +21,7 @@ import { import { DatasService } from './datas.service'; @Controller() -@UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt')) +@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) export class DataAliasController { constructor(private readonly datasService: DatasService) {} diff --git a/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts b/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts index 37f73bfb6b..503944e8fd 100644 --- a/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts +++ b/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts @@ -11,6 +11,7 @@ import { UseGuards, } from '@nestjs/common' import { AuthGuard } from '@nestjs/passport'; +import { GlobalGuard } from '../../../guards/global/global.guard' import { Acl, ExtractProjectIdMiddleware, @@ -18,7 +19,7 @@ import { import { OldDatasService } from './old-datas.service'; @Controller() -@UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt')) +@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) export class OldDatasController { constructor(private readonly oldDatasService: OldDatasService) {} diff --git a/packages/nocodb-nest/src/modules/filters/filters.controller.ts b/packages/nocodb-nest/src/modules/filters/filters.controller.ts index 3e963982de..3435a053c6 100644 --- a/packages/nocodb-nest/src/modules/filters/filters.controller.ts +++ b/packages/nocodb-nest/src/modules/filters/filters.controller.ts @@ -10,6 +10,7 @@ import { } from '@nestjs/common' import { AuthGuard } from '@nestjs/passport'; import { FilterReqType } from 'nocodb-sdk'; +import { GlobalGuard } from '../../guards/global/global.guard' import { PagedResponseImpl } from '../../helpers/PagedResponse'; import { Acl, @@ -19,7 +20,7 @@ import { import { FiltersService } from './filters.service'; @Controller() -@UseGuards(ExtractProjectIdMiddleware, AuthGuard('jwt')) +@UseGuards(ExtractProjectIdMiddleware, GlobalGuard) export class FiltersController { constructor(private readonly filtersService: FiltersService) {}