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
|
|
@ -1663,7 +1663,7 @@ export class OrganizationController extends Controller {
|
|||
// กำหนดการเข้าถึงข้อมูลตามสถานะและสิทธิ์
|
||||
const isCurrentActive = !orgRevision.orgRevisionIsDraft && orgRevision.orgRevisionIsCurrent;
|
||||
if (isCurrentActive) {
|
||||
if (profileAssign && _privilege.privilege !== "OWNER") {
|
||||
if (profileAssign && _privilege.privilege !== "OWNER" && _privilege.privilege !== "PARENT") {
|
||||
if (_privilege.privilege == "NORMAL") {
|
||||
const holder = profile.current_holders.find((x) => x.orgRevisionId === id);
|
||||
if (!holder) return;
|
||||
|
|
@ -5700,7 +5700,7 @@ export class OrganizationController extends Controller {
|
|||
// กำหนดการเข้าถึงข้อมูลตามสถานะและสิทธิ์
|
||||
const isCurrentActive = !orgRevision.orgRevisionIsDraft && orgRevision.orgRevisionIsCurrent;
|
||||
if (isCurrentActive) {
|
||||
if (profileAssign && _privilege.privilege !== "OWNER") {
|
||||
if (profileAssign && _privilege.privilege !== "OWNER" && _privilege.privilege !== "PARENT") {
|
||||
if (_privilege.privilege == "NORMAL") {
|
||||
const holder = profile.current_holders.find((x) => x.orgRevisionId === id);
|
||||
if (!holder) return;
|
||||
|
|
@ -6257,7 +6257,7 @@ export class OrganizationController extends Controller {
|
|||
// กำหนดการเข้าถึงข้อมูลตามสถานะและสิทธิ์
|
||||
const isCurrentActive = !orgRevision.orgRevisionIsDraft && orgRevision.orgRevisionIsCurrent;
|
||||
if (isCurrentActive) {
|
||||
if (_privilege.privilege !== "OWNER") {
|
||||
if (_privilege.privilege !== "OWNER" && _privilege.privilege !== "PARENT") {
|
||||
if (_privilege.privilege == "NORMAL") {
|
||||
const holder = profile.current_holders.find((x) => x.orgRevisionId === id);
|
||||
if (!holder) return;
|
||||
|
|
|
|||
|
|
@ -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