core: PERM_VIEW_PROBLEM check for domain_union

This commit is contained in:
undefined committed 2021-12-24 14:52:20 +08:00
1 parent 40edf15782
commit 10e0600b0b
3 files changed
+12 -4

No files matched your search

+2 -1
View File
@@ -154,8 +154,9 @@ export class ProblemMainHandler extends ProblemHandler {
let [pdocs, ppcount, pcount] = fail
? [[], 0, 0]
: await problem.list(
domainId, query, undefined,
domainId, query,
page, system.get('pagination.problem'),
undefined, this.user._id,
);
if (sort) pdocs = pdocs.sort((a, b) => sort.indexOf(`${a.domainId}/${a.docId}`) - sort.indexOf(`${b.domainId}/${b.docId}`));
if (q) {