mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: domain.lang
This commit is contained in:
1 parent
680e3ccd32
commit
387bd5eb38
6 files changed
+12
-11
No files matched your search
@@ -132,7 +132,7 @@ class RichMediaHandler extends Handler {
|
||||
async renderProblem(domainId, payload) {
|
||||
const cur = payload.domainId ? await user.getById(payload.domainId, this.user._id) : this.user;
|
||||
let pdoc = cur.hasPerm(PERM.PERM_VIEW | PERM.PERM_VIEW_PROBLEM)
|
||||
? await problem.get(domainId, payload.data) || problem.default
|
||||
? await problem.get(domainId, payload.id) || problem.default
|
||||
: problem.default;
|
||||
if (pdoc.hidden && !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