diff --git a/packages/hydrooj/src/model/contest.ts b/packages/hydrooj/src/model/contest.ts index 6ba270a21..09c0e64ea 100644 --- a/packages/hydrooj/src/model/contest.ts +++ b/packages/hydrooj/src/model/contest.ts @@ -708,6 +708,7 @@ export async function unlockScoreboard(domainId: string, tid: ObjectID) { } export function canViewHiddenScoreboard(this: { user: User }, tdoc: Tdoc<30>) { + if (this.user.own(tdoc)) return true; if (tdoc.rule === 'homework') return this.user.hasPerm(PERM.PERM_VIEW_HOMEWORK_HIDDEN_SCOREBOARD); return this.user.hasPerm(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD); }