mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: disable view contest code by default
This commit is contained in:
1 parent
eb6f1abc8b
commit
4b09a83ede
3 files changed
+3
-2
No files matched your search
@@ -155,7 +155,7 @@ class RecordDetailHandler extends Handler {
|
||||
canViewCode ||= this.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE);
|
||||
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE);
|
||||
canViewCode ||= this.user.hasPerm(PERM.PERM_READ_RECORD_CODE_ACCEPT) && self?.status === STATUS.STATUS_ACCEPTED;
|
||||
if (tdoc && contest.isDone(tdoc)) {
|
||||
if (tdoc && tdoc.allowViewCode && contest.isDone(tdoc)) {
|
||||
const tsdoc = await contest.getStatus(domainId, tdoc.docId, this.user._id);
|
||||
canViewCode ||= tsdoc?.attend;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user