diff --git a/packages/server/src/middleware/currentapp.ts b/packages/server/src/middleware/currentapp.ts index 2a5a0bd825f..615b95cecd0 100644 --- a/packages/server/src/middleware/currentapp.ts +++ b/packages/server/src/middleware/currentapp.ts @@ -40,7 +40,7 @@ export default async (ctx: UserCtx, next: any) => { appId = requestAppId // retrieving global user gets the right role roleId = globalUser.roleId || roleId - if (ctx.user && roleId == BUILTIN_ROLE_IDS.PUBLIC && env.UNIV_BASIC) + if (ctx.user && roleId == roles.BUILTIN_ROLE_IDS.PUBLIC && env.UNIV_BASIC) roleId = roles.BUILTIN_ROLE_IDS.BASIC // Allow builders to specify their role via a header const isBuilder =