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
@@ -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 });
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.12.0",
"version": "4.12.1",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",