去掉了一个多余的assert
This commit is contained in:
parent
700545aa01
commit
846626d9dc
|
|
@ -1058,7 +1058,7 @@ var RelationAuth = /** @class */ (function () {
|
|||
var e_4 = root.entity, d = root.data, f = root.filter, a = root.action;
|
||||
if (userRelations.length > 0) {
|
||||
(0, assert_1.default)(e_4 !== 'user');
|
||||
(0, assert_1.default)(a === 'create' && !(d instanceof Array));
|
||||
(0, assert_1.default)(!(d instanceof Array));
|
||||
var createIds_1 = userRelations.map(function (ele) { return ele.relationId; });
|
||||
// 这里处理的是创建对象时顺带创建相关权限,要检查该权限是不是有create动作授权
|
||||
var aas = context.select('actionAuth', {
|
||||
|
|
|
|||
|
|
@ -1245,7 +1245,7 @@ export class RelationAuth<ED extends EntityDict & BaseEntityDict>{
|
|||
const { entity: e, data: d, filter: f, action: a } = root;
|
||||
if (userRelations.length > 0) {
|
||||
assert(e !== 'user');
|
||||
assert(a === 'create' && !(d instanceof Array));
|
||||
assert(!(d instanceof Array));
|
||||
const createIds = userRelations.map(ele => ele.relationId!);
|
||||
// 这里处理的是创建对象时顺带创建相关权限,要检查该权限是不是有create动作授权
|
||||
const aas = context.select('actionAuth', {
|
||||
|
|
|
|||
Loading…
Reference in New Issue