mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: rich_media: check hidden problem
This commit is contained in:
1 parent
2638606dae
commit
900cce3614
4 files changed
+4
-4
No files matched your search
@@ -134,7 +134,7 @@ class RichMediaHandler extends Handler {
|
||||
let pdoc = cur.hasPerm(PERM.PERM_VIEW | PERM.PERM_VIEW_PROBLEM)
|
||||
? await problem.get(domainId, payload.id) || problem.default
|
||||
: problem.default;
|
||||
if (pdoc.hidden && !cur.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = problem.default;
|
||||
if (pdoc.hidden && !cur.own(pdoc) && !cur.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = problem.default;
|
||||
return await this.renderHTML('partials/problem.html', { pdoc });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user