Browse Source

fix(api): invalidate existing tokens on role update

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4426/head
Pranav C 2 years ago
parent
commit
823e83779a
  1. 7
      packages/nocodb/src/lib/meta/api/orgUserApis.ts

7
packages/nocodb/src/lib/meta/api/orgUserApis.ts

@ -42,7 +42,12 @@ async function userUpdate(req, res) {
NcError.badRequest('Cannot update super admin roles'); NcError.badRequest('Cannot update super admin roles');
} }
res.json(await User.update(req.params.userId, updateBody)); res.json(
await User.update(req.params.userId, {
...updateBody,
token_version: null,
})
);
} }
async function userDelete(req, res) { async function userDelete(req, res) {

Loading…
Cancel
Save