add permission brother
This commit is contained in:
parent
878e52b1b0
commit
3a4e16deb0
5 changed files with 35 additions and 21 deletions
|
|
@ -2525,7 +2525,11 @@ export class PositionController extends Controller {
|
|||
}),
|
||||
);
|
||||
|
||||
if (_data.privilege === "NORMAL" || _data.privilege === "CHILD") {
|
||||
if (
|
||||
_data.privilege === "NORMAL" ||
|
||||
_data.privilege === "CHILD" ||
|
||||
_data.privilege === "BROTHER"
|
||||
) {
|
||||
//PARENT จะไม่มีทางเห็น ROOT , CHILD ยึดจาก CHILD ที่อยู่ลงไปข้างล่างและจะไม่เห็น CHILD ที่อยู่เหนือกว่า
|
||||
const nextChildMap: any = {
|
||||
//เอาไวเช็ค CHILD ถัดไป
|
||||
|
|
@ -2539,7 +2543,7 @@ export class PositionController extends Controller {
|
|||
if (Array.isArray(childValue) && childValue.some((item) => item != null)) {
|
||||
return new HttpSuccess({ data: [], total: 0 });
|
||||
}
|
||||
} else if (_data.privilege === "CHILD") {
|
||||
} else if (_data.privilege === "CHILD" || _data.privilege === "BROTHER") {
|
||||
const higherChildChecks = [
|
||||
{ type: [0], child: _data.child1, next: _data.child2 },
|
||||
{ type: [0, 1], child: _data.child2, next: _data.child3 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue