过滤掉寻找anchor过程中的meta属性
This commit is contained in:
parent
5412e52b52
commit
4f0654a039
|
|
@ -36,11 +36,13 @@ var RelationAuth = /** @class */ (function () {
|
|||
var anchors = [];
|
||||
var anchorsOnMe = [];
|
||||
var _loop_1 = function (attr) {
|
||||
// todo $or会发生什么?by Xc
|
||||
if (attr === '$and') {
|
||||
filter[attr].forEach(function (ele) { return anchors.push.apply(anchors, tslib_1.__spreadArray([], tslib_1.__read(findHighestAnchors(entity, ele, path, excludePaths)), false)); });
|
||||
return "continue";
|
||||
}
|
||||
else if (attr.startsWith('$') || attr.startsWith('#')) {
|
||||
return "continue";
|
||||
}
|
||||
var rel = (0, relation_1.judgeRelation)(_this.schema, entity, attr);
|
||||
if (rel === 2) {
|
||||
var path2 = path ? "".concat(path, ".").concat(attr) : attr;
|
||||
|
|
|
|||
|
|
@ -74,13 +74,16 @@ export class RelationAuth<ED extends EntityDict & BaseEntityDict>{
|
|||
const anchors = [] as Anchor[];
|
||||
const anchorsOnMe = [] as Anchor[];
|
||||
for (const attr in filter) {
|
||||
// todo $or会发生什么?by Xc
|
||||
if (attr === '$and') {
|
||||
filter[attr].forEach(
|
||||
(ele: ED[keyof ED]['Selection']['filter']) => anchors.push(...findHighestAnchors(entity, ele!, path, excludePaths))
|
||||
);
|
||||
continue;
|
||||
}
|
||||
else if (attr.startsWith('$') || attr.startsWith('#')) {
|
||||
// todo $or会发生什么?by Xc
|
||||
continue;
|
||||
}
|
||||
const rel = judgeRelation(this.schema, entity, attr);
|
||||
if (rel === 2) {
|
||||
const path2 = path ? `${path}.${attr}` : attr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue