mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Moved verified email check closer to freeze logic
refs https://github.com/TryGhost/Team/issues/912 - Previous logic was a bit misleading because it prevented from reading the real threshold configured with an instance once the verified flag was present in the config. - The reshuffle made here allows to check the freeze logic based on the threshold and then process the returned result accordingly instead of having hidden logic behind "importThreshold" config value
This commit is contained in:
parent
8bc4d00fe6
commit
086840873e
1 changed files with 3 additions and 5 deletions
|
@ -54,10 +54,6 @@ function reconfigureMembersAPI() {
|
|||
}
|
||||
|
||||
const getThreshold = () => {
|
||||
if (_.get(config.get('hostSettings'), 'emailVerification.verified')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return _.get(config.get('hostSettings'), 'emailVerification.importThreshold');
|
||||
};
|
||||
|
||||
|
@ -78,7 +74,9 @@ const processImport = async (options) => {
|
|||
const freezeTriggered = result.meta.freeze;
|
||||
delete result.meta.freeze;
|
||||
|
||||
if (freezeTriggered) {
|
||||
const isVerifiedEmail = config.get('hostSettings:emailVerification:verified') === true;
|
||||
|
||||
if ((!isVerifiedEmail) && freezeTriggered) {
|
||||
limits.init({
|
||||
emails: {
|
||||
disabled: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue