Various fixes.
This commit is contained in:
parent
4e4b77ca84
commit
02360be75b
20 changed files with 3137 additions and 3124 deletions
|
@ -219,7 +219,7 @@ async function getDefaultCustomFormValues() {
|
|||
|
||||
// TODO - this could run in the browser too - move to shared
|
||||
function checkForMjmlErrors(form) {
|
||||
let testLayout = '<mjml><mj-body><mj-container>{{{body}}}</mj-container></mj-body></mjml>';
|
||||
let testLayout = '<mjml><mj-body>{{{body}}}</mj-body></mjml>';
|
||||
|
||||
let hasMjmlError = (template, layout = testLayout) => {
|
||||
let source = layout.replace(/\{\{\{body\}\}\}/g, template);
|
||||
|
|
|
@ -226,7 +226,16 @@ async function remove(context, id) {
|
|||
await shares.enforceEntityPermissionTx(tx, context, 'namespace', id, 'delete');
|
||||
|
||||
const entityTypesWithNamespace = Object.keys(entitySettings.getEntityTypes());
|
||||
await dependencyHelpers.ensureNoDependencies(tx, context, id, entityTypesWithNamespace.map(entityTypeId => ({ entityTypeId: entityTypeId, column: 'namespace' })));
|
||||
|
||||
const depSpecs = entityTypesWithNamespace.map(entityTypeId => {
|
||||
if (entityTypeId === 'user') {
|
||||
return { entityTypeId: entityTypeId, column: 'namespace', viewPermission: {entityTypeId: 'namespace', entityId: id, requiredOperations: 'manageUsers'} };
|
||||
} else {
|
||||
return { entityTypeId: entityTypeId, column: 'namespace' };
|
||||
}
|
||||
});
|
||||
|
||||
await dependencyHelpers.ensureNoDependencies(tx, context, id, depSpecs);
|
||||
|
||||
await tx('namespaces').where('id', id).del();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue