Browse Source

fix(nocodb): assign dbuser id n roles to user

pull/5720/head
Wing-Kam Wong 1 year ago
parent
commit
5765078fce
  1. 5
      packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts

5
packages/nocodb/src/strategies/authtoken.strategy/authtoken.strategy.ts

@ -26,6 +26,11 @@ export class AuthTokenStrategy extends PassportStrategy(Strategy, 'authtoken') {
return callback({ msg: 'User not found' });
}
Object.assign(user, {
id: dbUser.id,
roles: dbUser.roles,
});
dbUser.is_api_token = true;
if (req['ncProjectId']) {
const projectUser = await ProjectUser.get(

Loading…
Cancel
Save