work in progress on segments
some cleanup of models - handling dependencies in delete
This commit is contained in:
parent
b23529a75b
commit
0bfb30817b
29 changed files with 553 additions and 990 deletions
|
@ -126,7 +126,7 @@ async function create(context, entity) {
|
|||
const id = ids[0];
|
||||
|
||||
// We don't have to rebuild all entity types, because no entity can be a child of the namespace at this moment.
|
||||
await shares.rebuildPermissions(tx, { entityTypeId: 'namespace', entityId: id });
|
||||
await shares.rebuildPermissionsTx(tx, { entityTypeId: 'namespace', entityId: id });
|
||||
|
||||
return id;
|
||||
});
|
||||
|
@ -166,7 +166,7 @@ async function updateWithConsistencyCheck(context, entity) {
|
|||
|
||||
await tx('namespaces').where('id', entity.id).update(filterObject(entity, allowedKeys));
|
||||
|
||||
await shares.rebuildPermissions(tx);
|
||||
await shares.rebuildPermissionsTx(tx);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue