Fix bug #54
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m34s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m34s
This commit is contained in:
parent
8497e5df57
commit
637e995915
2 changed files with 6 additions and 6 deletions
|
|
@ -289,7 +289,7 @@ export class ProfileLeaveService {
|
|||
isAll?: boolean,
|
||||
): Promise<OrganizationCondition> {
|
||||
// Early return สำหรับ OWNER privilege
|
||||
if (_data.privilege === "OWNER") {
|
||||
if (_data.privilege === "OWNER" || _data.privilege === "PARENT") {
|
||||
return { condition: "1=1", params: {} };
|
||||
}
|
||||
|
||||
|
|
@ -549,7 +549,7 @@ export class ProfileLeaveService {
|
|||
|
||||
queryBuilder.andWhere(nodeCondition.condition, nodeCondition.params);
|
||||
|
||||
if (_data.privilege !== "OWNER") {
|
||||
if (_data.privilege !== "OWNER" && _data.privilege !== "PARENT") {
|
||||
queryBuilder.andWhere(permissionCondition.condition, permissionCondition.params);
|
||||
}
|
||||
}
|
||||
|
|
@ -717,7 +717,7 @@ export class ProfileLeaveService {
|
|||
|
||||
queryBuilder.andWhere(nodeCondition.condition, nodeCondition.params);
|
||||
|
||||
if (_data.privilege !== "OWNER") {
|
||||
if (_data.privilege !== "OWNER" && _data.privilege !== "PARENT") {
|
||||
queryBuilder.andWhere(permissionCondition.condition, permissionCondition.params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue