暴漏server对象

This commit is contained in:
undefined committed 2020-08-01 14:43:35 +08:00
1 parent 0194ab4eb0
commit e66d5a0221
7 files changed
+18 -9

No files matched your search

+2
View File
@@ -160,6 +160,8 @@ export function getNode(domainId: string, _id: string) {
export async function getVnode(domainId: string, type: number, id: string, handler: any) {
if (type === document.TYPE_PROBLEM) {
// @ts-ignore
if (Number.isSafeInteger(parseInt(id, 10))) id = parseInt(id, 10);
const pdoc = await problem.get(domainId, id);
if (!pdoc) return null;
if (pdoc.hidden && handler) handler.checkPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN);