This commit is contained in:
parent
bbbc8d2157
commit
0718f28e5e
1 changed files with 14 additions and 14 deletions
|
|
@ -214,13 +214,13 @@ export class PermissionController extends Controller {
|
|||
return {
|
||||
...baseAttr,
|
||||
parentNode: actingAttr.parentNode,
|
||||
attrOwnership: actingAttr.attrOwnership,
|
||||
attrIsCreate: actingAttr.attrIsCreate,
|
||||
attrIsList: actingAttr.attrIsList,
|
||||
attrIsGet: actingAttr.attrIsGet,
|
||||
attrIsUpdate: actingAttr.attrIsUpdate,
|
||||
attrIsDelete: actingAttr.attrIsDelete,
|
||||
attrPrivilege: actingAttr.attrPrivilege,
|
||||
attrOwnership: getHigherOwnership(actingAttr.attrOwnership, baseAttr.attrOwnership),
|
||||
attrIsCreate: actingAttr.attrIsCreate || baseAttr.attrIsCreate,
|
||||
attrIsList: actingAttr.attrIsList || baseAttr.attrIsList,
|
||||
attrIsGet: actingAttr.attrIsGet || baseAttr.attrIsGet,
|
||||
attrIsUpdate: actingAttr.attrIsUpdate || baseAttr.attrIsUpdate,
|
||||
attrIsDelete: actingAttr.attrIsDelete || baseAttr.attrIsDelete,
|
||||
attrPrivilege: getHigherPrivilege(actingAttr.attrPrivilege, baseAttr.attrPrivilege),
|
||||
// เพิ่ม metadata เพื่อระบุว่ามาจาก acting
|
||||
_isActing: true,
|
||||
};
|
||||
|
|
@ -1017,13 +1017,13 @@ export class PermissionController extends Controller {
|
|||
return {
|
||||
...baseAttr,
|
||||
parentNode: actingAttr.parentNode,
|
||||
attrOwnership: actingAttr.attrOwnership,
|
||||
attrIsCreate: actingAttr.attrIsCreate,
|
||||
attrIsList: actingAttr.attrIsList,
|
||||
attrIsGet: actingAttr.attrIsGet,
|
||||
attrIsUpdate: actingAttr.attrIsUpdate,
|
||||
attrIsDelete: actingAttr.attrIsDelete,
|
||||
attrPrivilege: actingAttr.attrPrivilege,
|
||||
attrOwnership: getHigherOwnership(actingAttr.attrOwnership, baseAttr.attrOwnership),
|
||||
attrIsCreate: actingAttr.attrIsCreate || baseAttr.attrIsCreate,
|
||||
attrIsList: actingAttr.attrIsList || baseAttr.attrIsList,
|
||||
attrIsGet: actingAttr.attrIsGet || baseAttr.attrIsGet,
|
||||
attrIsUpdate: actingAttr.attrIsUpdate || baseAttr.attrIsUpdate,
|
||||
attrIsDelete: actingAttr.attrIsDelete || baseAttr.attrIsDelete,
|
||||
attrPrivilege: getHigherPrivilege(actingAttr.attrPrivilege, baseAttr.attrPrivilege),
|
||||
_isActing: true,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue