This commit is contained in:
Rory Powell 2021-10-26 09:42:19 +01:00
parent ad61f2af3b
commit 46a886f83d
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,10 @@ module.exports = async (ctx, next) => {
} }
// deny access to application preview // deny access to application preview
if (isDevAppID(requestAppId) && (!ctx.user || !ctx.user.builder?.global)) { if (
isDevAppID(requestAppId) &&
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global)
) {
clearCookie(ctx, Cookies.CurrentApp) clearCookie(ctx, Cookies.CurrentApp)
return ctx.redirect("/") return ctx.redirect("/")
} }