mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: allow admin view contest problem (#419)
This commit is contained in:
1 parent
e06c86e9dd
commit
efbc3c0162
6 files changed
+10
-6
No files matched your search
@@ -127,7 +127,7 @@ export class ContestDetailHandler extends ContestDetailBaseHandler {
|
||||
.replace(/="file:\/\//g, `="./${this.tdoc.docId}/file/`);
|
||||
}
|
||||
if (
|
||||
(contest.isNotStarted(this.tdoc) || !this.tsdoc?.attend)
|
||||
(contest.isNotStarted(this.tdoc) || (!this.tsdoc?.attend && !contest.isDone(this.tdoc)))
|
||||
&& !this.user.own(this.tdoc)
|
||||
&& !this.user.hasPerm(PERM.PERM_VIEW_CONTEST_HIDDEN_SCOREBOARD)
|
||||
) return;
|
||||
|
||||
@@ -74,7 +74,7 @@ class HomeworkDetailHandler extends Handler {
|
||||
tdoc, tsdoc, udict, ddocs, page, dpcount, dcount,
|
||||
};
|
||||
if (
|
||||
(contest.isNotStarted(tdoc) || !tsdoc?.attend)
|
||||
(contest.isNotStarted(tdoc) || (!tsdoc?.attend && !contest.isDone(tdoc)))
|
||||
&& !this.user.own(tdoc)
|
||||
&& !this.user.hasPerm(PERM.PERM_VIEW_HOMEWORK_HIDDEN_SCOREBOARD)
|
||||
) return;
|
||||
|
||||
Reference in new issue
Block a user