ui: rich_media: check hidden problem

This commit is contained in:
undefined committed 2021-06-29 18:57:01 +08:00
1 parent 2638606dae
commit 900cce3614
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -228,7 +228,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
problem.get(this.domainId, rdoc.pid, null),
]);
if (pdoc) {
if (pdoc.hidden && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
if (pdoc.hidden && !this.user.own(pdoc) && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
}
if (this.pretest) this.send({ rdoc });