operate时对userRelation判定不严格
This commit is contained in:
parent
4cae66e429
commit
28f44df68c
|
|
@ -711,7 +711,7 @@ var RelationAuth = /** @class */ (function () {
|
|||
* @returns
|
||||
*/
|
||||
var findOwnCreateUserRelation = function (actionAuths) {
|
||||
if (userRelations) {
|
||||
if (userRelations && userRelations.length > 0) {
|
||||
(0, assert_1.default)(action === 'create');
|
||||
var ars = actionAuths.filter(function (ar) { return !!userRelations.find(function (ur) { return ur.relationId === ar.relationId; }) && ar.paths.includes('') && ar.destEntity === entity; });
|
||||
if (ars.length > 0) {
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ export class RelationAuth<ED extends EntityDict & BaseEntityDict>{
|
|||
* @returns
|
||||
*/
|
||||
const findOwnCreateUserRelation = (actionAuths: ED['actionAuth']['OpSchema'][]) => {
|
||||
if (userRelations) {
|
||||
if (userRelations && userRelations.length > 0) {
|
||||
assert(action === 'create');
|
||||
const ars = actionAuths.filter(
|
||||
(ar) => !!userRelations.find(
|
||||
|
|
|
|||
Loading…
Reference in New Issue