diff --git a/packages/onsite-toolkit/index.ts b/packages/onsite-toolkit/index.ts index cf124da8a..0db844dff 100644 --- a/packages/onsite-toolkit/index.ts +++ b/packages/onsite-toolkit/index.ts @@ -85,7 +85,7 @@ export function apply(ctx: Context, config: ReturnType) { ctx.on('handler/before/UserDetail', disable); ctx.on('handler/before/UserLostPass', disable); ctx.on('handler/before/HomeSettings', (that) => { - if (that.user.contestMode) return; + if (!that.user.contestMode) return; if (['domain', 'account'].includes(that.args.category)) throw new ForbiddenError('Not available'); });