build
This commit is contained in:
parent
46627a2f37
commit
3e81ef9eb9
|
|
@ -1489,6 +1489,13 @@ var RelationAuth = /** @class */ (function () {
|
|||
};
|
||||
var addChild = function (node, path, child) {
|
||||
var _a;
|
||||
// 在这里要把可以被node deduce出来的child处理掉
|
||||
var paths = path.split('$');
|
||||
(0, assert_1.default)(paths.length === 2);
|
||||
if (_this.authDeduceRelationMap[child.entity] === paths[1]) {
|
||||
(0, assert_1.default)(paths[1] === 'entity', '当前只支持entity外键上的deduce');
|
||||
return false;
|
||||
}
|
||||
if (node.children[path]) {
|
||||
if (node.children[path] instanceof Array) {
|
||||
node.children[path].push(child);
|
||||
|
|
@ -1502,6 +1509,7 @@ var RelationAuth = /** @class */ (function () {
|
|||
_a[path] = child,
|
||||
_a));
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var destructInner = function (entity, operation, path, child, hasParent) {
|
||||
var action = operation.action, data = operation.data, filter = operation.filter;
|
||||
|
|
|
|||
Loading…
Reference in New Issue