diff --git a/packages/nc-gui/composables/useApi/interceptors.ts b/packages/nc-gui/composables/useApi/interceptors.ts index 4c12bc083c..c09c8c3b2e 100644 --- a/packages/nc-gui/composables/useApi/interceptors.ts +++ b/packages/nc-gui/composables/useApi/interceptors.ts @@ -69,6 +69,7 @@ export function addAxiosInterceptors(api: Api) { await state.signOut() // todo: handle new user + debugger navigateTo('/signIn') return Promise.reject(error) diff --git a/packages/nocodb/src/controllers/users/users.controller.ts b/packages/nocodb/src/controllers/users/users.controller.ts index 02f4bf13c2..e618890e7a 100644 --- a/packages/nocodb/src/controllers/users/users.controller.ts +++ b/packages/nocodb/src/controllers/users/users.controller.ts @@ -13,7 +13,10 @@ import * as ejs from 'ejs'; import { AuthGuard } from '@nestjs/passport'; import { GlobalGuard } from '../../guards/global/global.guard'; import { NcError } from '../../helpers/catchError'; -import { Acl } from '../../middlewares/extract-project-id/extract-project-id.middleware'; +import { + Acl, + ExtractProjectIdMiddleware, +} from '../../middlewares/extract-project-id/extract-project-id.middleware'; import { User } from '../../models'; import { randomTokenString, @@ -96,7 +99,7 @@ export class UsersController { } @Get(['/auth/user/me', '/api/v1/db/auth/user/me', '/api/v1/auth/user/me']) - @UseGuards(GlobalGuard) + @UseGuards(ExtractProjectIdMiddleware, GlobalGuard) async me(@Request() req) { const user = { ...req.user,