test parent

This commit is contained in:
mamoss 2025-10-12 16:51:21 +07:00
parent e23d89c9cd
commit bfea0438f8
3 changed files with 4 additions and 4 deletions

View file

@ -105,7 +105,7 @@ export class OrganizationDotnetController extends Controller {
condition = "orgRoot.ancestorDNA = :nodeId";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "PARENT") {
condition = "orgChild1.ancestorDNA = :nodeId";
condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "NORMAL") {
switch (body.node) {
@ -224,7 +224,7 @@ export class OrganizationDotnetController extends Controller {
condition = "orgRoot.ancestorDNA = :nodeId";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "PARENT") {
condition = "orgChild1.ancestorDNA = :nodeId";
condition = "orgRoot.ancestorDNA = :nodeId AND current_holders.orgChild1 IS NOT NULL";
conditionParams = { nodeId: body.nodeId };
} else if (body.role === "NORMAL") {
switch (body.node) {

View file

@ -735,7 +735,7 @@ export class PermissionController extends Controller {
} else if (privilege == "PARENT") {
data = {
root: [x.orgRootId],
child1: [x.orgChild1Id],
child1: null,
child2: null,
child3: null,
child4: null,

View file

@ -97,7 +97,7 @@ class CheckAuth {
} else if (privilege == "PARENT") {
data = {
root: [x.orgRootId],
child1: [x.orgChild1Id],
child1: null,
child2: null,
child3: null,
child4: null,