Completely removed CKEditor 5
Some fixes of bugs from testing in production env.
This commit is contained in:
parent
d459f7cfed
commit
43c6b58793
17 changed files with 2901 additions and 440 deletions
|
@ -108,6 +108,7 @@ async function create(context, listId, entity, files) {
|
|||
const filteredEntity = filterObject(entity, allowedKeysCreate);
|
||||
filteredEntity.list = listId;
|
||||
filteredEntity.settings = JSON.stringify(filteredEntity.settings);
|
||||
filteredEntity.status = entity.status;
|
||||
|
||||
filteredEntity.mapping_type = MappingType.BASIC_SUBSCRIBE; // This is not set in the create form. It can be changed in the update form.
|
||||
filteredEntity.mapping = JSON.stringify({});
|
||||
|
|
|
@ -16,7 +16,7 @@ const dependencyHelpers = require('../lib/dependency-helpers');
|
|||
|
||||
const UnsubscriptionMode = require('../../shared/lists').UnsubscriptionMode;
|
||||
|
||||
const allowedKeys = new Set(['name', 'description', 'default_form', 'public_subscribe', 'unsubscription_mode', 'contact_email', 'homepage', 'namespace', 'to_name', 'listunsubscribe_disabled']);
|
||||
const allowedKeys = new Set(['name', 'description', 'default_form', 'public_subscribe', 'unsubscription_mode', 'contact_email', 'homepage', 'namespace', 'to_name', 'listunsubscribe_disabled', 'send_configuration']);
|
||||
|
||||
function hash(entity) {
|
||||
return hasher.hash(filterObject(entity, allowedKeys));
|
||||
|
@ -130,6 +130,7 @@ async function create(context, entity) {
|
|||
' `status` tinyint(4) unsigned NOT NULL DEFAULT \'1\',\n' +
|
||||
' `is_test` tinyint(4) unsigned NOT NULL DEFAULT \'0\',\n' +
|
||||
' `status_change` timestamp NULL DEFAULT NULL,\n' +
|
||||
' `unsubscribed` timestamp NULL DEFAULT NULL,\n' +
|
||||
' `latest_open` timestamp NULL DEFAULT NULL,\n' +
|
||||
' `latest_click` timestamp NULL DEFAULT NULL,\n' +
|
||||
' `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n' +
|
||||
|
@ -145,6 +146,8 @@ async function create(context, entity) {
|
|||
' KEY `created` (`created`)\n' +
|
||||
') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;\n');
|
||||
|
||||
await shares.rebuildPermissionsTx(tx, { entityTypeId: 'list', entityId: id });
|
||||
|
||||
return id;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ async function create(context, entity) {
|
|||
|
||||
async function updateWithConsistencyCheck(context, entity) {
|
||||
await knex.transaction(async tx => {
|
||||
await shares.enforceEntityPermissionTx(tx, context, 'list', entity.id, 'edit');
|
||||
await shares.enforceEntityPermissionTx(tx, context, 'sendConfiguration', entity.id, 'edit');
|
||||
|
||||
const existing = await tx('send_configurations').where('id', entity.id).first();
|
||||
if (!existing) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue