Browse Source

fix: super admin table and view list access

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6333/head
mertmit 1 year ago
parent
commit
6a465a6653
  1. 7
      packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts

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

@ -220,6 +220,13 @@ export class AclMiddleware implements NestInterceptor {
NcError.forbidden('Unauthorized access'); 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<string, boolean> = extractRolesObj(userScopeRole); const roles: Record<string, boolean> = extractRolesObj(userScopeRole);
if (req?.user?.is_api_token && blockApiTokenAccess) { if (req?.user?.is_api_token && blockApiTokenAccess) {

Loading…
Cancel
Save