Browse Source

fix: cleanup unnecessary code

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6329/head
mertmit 1 year ago
parent
commit
8a923743b6
  1. 4
      packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts

4
packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts

@ -180,8 +180,8 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate {
}
function getUserRoleForScope(user: any, scope: string) {
if (scope === 'project' || scope === 'workspace') {
return user?.project_roles || user?.workspace_roles;
if (scope === 'project') {
return user?.project_roles;
} else if (scope === 'org') {
return user?.roles;
}

Loading…
Cancel
Save