From 8a923743b6afdf6dee08ca58698a767d33ed2fc5 Mon Sep 17 00:00:00 2001 From: mertmit Date: Fri, 8 Sep 2023 11:18:09 +0300 Subject: [PATCH] fix: cleanup unnecessary code Signed-off-by: mertmit --- .../src/middlewares/extract-ids/extract-ids.middleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts b/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts index 6dd0c79582..d5ed6a9c33 100644 --- a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts +++ b/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; }