mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: list all domains for users with PRIV_VIEW_ALL_DOMAIN
This commit is contained in:
1 parent
ced60e6567
commit
29965f323b
16 files changed
+53
-26
No files matched your search
@@ -92,7 +92,9 @@ class RecordDetailHandler extends Handler {
|
||||
const tdoc = await contest.get(domainId, rdoc.contest.tid, rdoc.contest.type);
|
||||
if (!contest.canShowRecord.call(this, tdoc, true)) throw new PermissionError(rid);
|
||||
}
|
||||
if (rdoc.uid !== this.user._id && !this.user.hasPerm(PERM.PERM_READ_RECORD_CODE)) rdoc.code = null;
|
||||
if (rdoc.uid !== this.user._id && !this.user.hasPriv(PRIV.PRIV_READ_RECORD_CODE)) {
|
||||
if (!this.user.hasPerm(PERM.PERM_READ_RECORD_CODE)) rdoc.code = null;
|
||||
}
|
||||
// eslint-disable-next-line prefer-const
|
||||
let [pdoc, udoc] = await Promise.all([
|
||||
problem.get(domainId, rdoc.pid),
|
||||
|
||||
Reference in new issue
Block a user