mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: contest: allow manager view hidden scoreboard
This commit is contained in:
1 parent
0cbb51cc19
commit
dc7f2a877e
1 file changed
+1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user