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..77a9cb331c 100644 --- a/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts +++ b/packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts @@ -220,6 +220,13 @@ export class AclMiddleware implements NestInterceptor { NcError.forbidden('Unauthorized access'); } + // assign owner role to super admin for all projects + if (userScopeRole === OrgUserRoles.SUPER_ADMIN) { + req.user.project_roles = { + [ProjectRoles.OWNER]: true, + }; + } + const roles: Record = extractRolesObj(userScopeRole); if (req?.user?.is_api_token && blockApiTokenAccess) {