在处理deduce对象为special的情况时有点问题
This commit is contained in:
parent
9d75199cd8
commit
63fbc69ccb
|
|
@ -725,8 +725,8 @@ var RelationAuth = /** @class */ (function () {
|
||||||
var unspecicalEntities = deducedEntityFilters.filter(function (ele) { return !RelationAuth.SPECIAL_ENTITIES.includes(ele.entity); });
|
var unspecicalEntities = deducedEntityFilters.filter(function (ele) { return !RelationAuth.SPECIAL_ENTITIES.includes(ele.entity); });
|
||||||
var result = [];
|
var result = [];
|
||||||
if (specialEntities.length > 0) {
|
if (specialEntities.length > 0) {
|
||||||
// 对special对象,直接判定create应该问题不大,否则写起来太烦琐
|
// 对于deduce出来的special对象,直接判定create应该问题不大,否则写起来太烦琐(具体情况遇到了再调试)
|
||||||
result.push.apply(result, tslib_1.__spreadArray([], tslib_1.__read(specialEntities.map(function (ele) { return _this.checkOperateSpecialEntities2(ele.entity, 'create', ele.filter, context); })), false));
|
result.push.apply(result, tslib_1.__spreadArray([], tslib_1.__read(specialEntities.map(function (ele) { return _this.checkOperateSpecialEntities2(ele.entity, ele.entity === entity ? node.action : 'create', ele.filter, context); })), false));
|
||||||
}
|
}
|
||||||
if (unspecicalEntities.length > 0) {
|
if (unspecicalEntities.length > 0) {
|
||||||
var allEntities = unspecicalEntities.map(function (ele) { return ele.entity; });
|
var allEntities = unspecicalEntities.map(function (ele) { return ele.entity; });
|
||||||
|
|
|
||||||
|
|
@ -906,10 +906,10 @@ export class RelationAuth<ED extends EntityDict & BaseEntityDict>{
|
||||||
|
|
||||||
const result: (boolean | Promise<boolean>)[] = [];
|
const result: (boolean | Promise<boolean>)[] = [];
|
||||||
if (specialEntities.length > 0) {
|
if (specialEntities.length > 0) {
|
||||||
// 对special对象,直接判定create应该问题不大,否则写起来太烦琐
|
// 对于deduce出来的special对象,直接判定create应该问题不大,否则写起来太烦琐(具体情况遇到了再调试)
|
||||||
result.push(
|
result.push(
|
||||||
...specialEntities.map(
|
...specialEntities.map(
|
||||||
ele => this.checkOperateSpecialEntities2(ele.entity, 'create', ele.filter, context)
|
ele => this.checkOperateSpecialEntities2(ele.entity, ele.entity === entity ? node.action : 'create', ele.filter, context)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue