mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix contest manager can not view contest record code (#764)
This commit is contained in:
1 parent
1b394f7442
commit
78f5f31762
1 file changed
+1
@@ -188,6 +188,7 @@ class RecordDetailHandler extends ContestDetailBaseHandler {
|
||||
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE_ACCEPT) && self?.status === STATUS.STATUS_ACCEPTED;
|
||||
if (this.tdoc) {
|
||||
const tsdoc = await contest.getStatus(domainId, this.tdoc.docId, this.user._id);
|
||||
canViewCode ||= this.user.own(this.tdoc);
|
||||
if (this.tdoc.allowViewCode && contest.isDone(this.tdoc)) {
|
||||
canViewCode ||= tsdoc?.attend;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user