Browse Source

fix(nocodb): add missing GlobalGuard on signout

pull/5905/head
Wing-Kam Wong 1 year ago
parent
commit
3408f64243
  1. 8
      packages/nocodb/src/controllers/users/users.controller.ts

8
packages/nocodb/src/controllers/users/users.controller.ts

@ -73,11 +73,15 @@ export class UsersController {
res.json(this.usersService.login(req.user)); res.json(this.usersService.login(req.user));
} }
@UseGuards(GlobalGuard)
@Post('/api/v1/auth/user/signout') @Post('/api/v1/auth/user/signout')
@HttpCode(200) @HttpCode(200)
async signout(@Request() req, @Response() res): Promise<any> { async signOut(@Request() req, @Response() res): Promise<any> {
if (!(req as any).isAuthenticated()) {
NcError.forbidden('Not allowed');
}
res.json( res.json(
await this.usersService.signout({ await this.usersService.signOut({
req, req,
res, res,
}), }),

Loading…
Cancel
Save