mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix copy referenced problem
This commit is contained in:
1 file changed
+1
-1
@@ -427,7 +427,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
|||||||
domain.get(this.pdoc.reference.domainId),
|
domain.get(this.pdoc.reference.domainId),
|
||||||
]);
|
]);
|
||||||
if (!pdoc) throw new ProblemNotFoundError(this.pdoc.reference.domainId, this.pdoc.reference.pid);
|
if (!pdoc) throw new ProblemNotFoundError(this.pdoc.reference.domainId, this.pdoc.reference.pid);
|
||||||
t = `,${ddoc.domain.share || ''},`;
|
t = `,${ddoc.share || ''},`;
|
||||||
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(ddoc._id, target);
|
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(ddoc._id, target);
|
||||||
}
|
}
|
||||||
if (!dudoc.hasPerm(PERM.PERM_CREATE_PROBLEM)) throw new PermissionError(PERM.PERM_CREATE_PROBLEM);
|
if (!dudoc.hasPerm(PERM.PERM_CREATE_PROBLEM)) throw new PermissionError(PERM.PERM_CREATE_PROBLEM);
|
||||||
|
|||||||
Reference in new issue
Block a user