owner privilege
This commit is contained in:
parent
ad3a04ad3f
commit
04484444ec
1 changed files with 25 additions and 21 deletions
|
|
@ -6145,6 +6145,7 @@ export class OrganizationController extends Controller {
|
||||||
// กำหนดการเข้าถึงข้อมูลตามสถานะและสิทธิ์
|
// กำหนดการเข้าถึงข้อมูลตามสถานะและสิทธิ์
|
||||||
const isCurrentActive = !orgRevision.orgRevisionIsDraft && orgRevision.orgRevisionIsCurrent;
|
const isCurrentActive = !orgRevision.orgRevisionIsDraft && orgRevision.orgRevisionIsCurrent;
|
||||||
if (isCurrentActive) {
|
if (isCurrentActive) {
|
||||||
|
if(_privilege.privilege !== "OWNER"){
|
||||||
if(_privilege.privilege == "NORMAL"){
|
if(_privilege.privilege == "NORMAL"){
|
||||||
const holder = profile.current_holders.find(x => x.orgRevisionId === id);
|
const holder = profile.current_holders.find(x => x.orgRevisionId === id);
|
||||||
if (!holder) return;
|
if (!holder) return;
|
||||||
|
|
@ -6172,6 +6173,9 @@ export class OrganizationController extends Controller {
|
||||||
}else{
|
}else{
|
||||||
_data.root = [profile.current_holders.find((x) => x.orgRevisionId === id)?.orgRootId];
|
_data.root = [profile.current_holders.find((x) => x.orgRevisionId === id)?.orgRootId];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (!attrOwnership) _data = _privilege;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const orgRootData = await AppDataSource.getRepository(OrgRoot)
|
const orgRootData = await AppDataSource.getRepository(OrgRoot)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue