Browse Source

fix: all access to super user

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6307/head
mertmit 1 year ago
parent
commit
7395b03872
  1. 5
      packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts

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

@ -211,7 +211,10 @@ export class AclMiddleware implements NestInterceptor {
const req = context.switchToHttp().getRequest(); const req = context.switchToHttp().getRequest();
const userScopeRole = getUserRoleForScope(req.user, scope); const userScopeRole =
req.user.roles?.[OrgUserRoles.SUPER_ADMIN] === true
? OrgUserRoles.SUPER_ADMIN
: getUserRoleForScope(req.user, scope);
if (!userScopeRole) { if (!userScopeRole) {
NcError.forbidden('Unauthorized access'); NcError.forbidden('Unauthorized access');

Loading…
Cancel
Save