diff --git a/packages/nocodb/src/controllers/users/users.controller.ts b/packages/nocodb/src/controllers/users/users.controller.ts index 0c8f153c78..ec94567d43 100644 --- a/packages/nocodb/src/controllers/users/users.controller.ts +++ b/packages/nocodb/src/controllers/users/users.controller.ts @@ -73,11 +73,15 @@ export class UsersController { res.json(this.usersService.login(req.user)); } + @UseGuards(GlobalGuard) @Post('/api/v1/auth/user/signout') @HttpCode(200) - async signout(@Request() req, @Response() res): Promise { + async signOut(@Request() req, @Response() res): Promise { + if (!(req as any).isAuthenticated()) { + NcError.forbidden('Not allowed'); + } res.json( - await this.usersService.signout({ + await this.usersService.signOut({ req, res, }),