mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Persisted email freeze in settings table
refs https://github.com/TryGhost/Team/issues/912 - The email freeze state has to be stored somewhere to make it through the instance restart and settings table is the best place for it.
This commit is contained in:
parent
2fbc1af165
commit
06788f0b6a
1 changed files with 6 additions and 0 deletions
|
@ -12,6 +12,7 @@ const urlUtils = require('../../../shared/url-utils');
|
|||
const labsService = require('../../../shared/labs');
|
||||
const settingsCache = require('../../../shared/settings-cache');
|
||||
const config = require('../../../shared/config');
|
||||
const models = require('../../models');
|
||||
const ghostVersion = require('@tryghost/version');
|
||||
const _ = require('lodash');
|
||||
const {GhostMailer} = require('../mail');
|
||||
|
@ -85,6 +86,11 @@ const processImport = async (options) => {
|
|||
}
|
||||
});
|
||||
|
||||
await models.Settings.edit([{
|
||||
key: 'email_freeze',
|
||||
value: true
|
||||
}], {context: {internal: true}});
|
||||
|
||||
throw new errors.ValidationError({
|
||||
message: tpl(messages.emailVerificationNeeded)
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue