mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
暴漏server对象
This commit is contained in:
1 parent
0194ab4eb0
commit
e66d5a0221
7 files changed
+18
-9
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user