Browse Source

Merge pull request #5720 from nocodb/fix/xc-token

fix(nocodb): assign dbuser id n roles to user
pull/5723/head
աɨռɢӄաօռɢ 1 year ago committed by GitHub
parent
commit
6b978398f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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