mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed error not showing up in PPM after instance freeze
refs https://github.com/TryGhost/Team/issues/999
refs 637fa58983
- Right after the freeze is triggered the post publish menu did not have the latest settings loaded to display the "disabled email" warning.
This commit is contained in:
parent
984b4a6739
commit
dfb0acf1a1
1 changed files with 15 additions and 14 deletions
|
@ -187,7 +187,7 @@ export default Component.extend({
|
|||
|
||||
this._postStatus = this.postStatus;
|
||||
this.setDefaultSendEmailWhenPublished();
|
||||
this.checkIsSendingEmailLimited();
|
||||
this.checkIsSendingEmailLimitedTask.perform();
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
@ -259,21 +259,18 @@ export default Component.extend({
|
|||
}
|
||||
},
|
||||
|
||||
checkIsSendingEmailLimited: action(function () {
|
||||
if (this.limit.limiter && this.limit.limiter.isLimited('emails')) {
|
||||
this.checkIsSendingEmailLimitedTask.perform();
|
||||
} else if (this.settings.get('emailVerificationRequired')) {
|
||||
this.set('isSendingEmailLimited', true);
|
||||
this.set('sendingEmailLimitError', 'Email sending is temporarily disabled because your account is currently in review. You should have an email about this from us already, but you can also reach us any time at support@ghost.org.');
|
||||
} else {
|
||||
this.set('isSendingEmailLimited', false);
|
||||
this.set('sendingEmailLimitError', null);
|
||||
}
|
||||
}),
|
||||
|
||||
checkIsSendingEmailLimitedTask: task(function* () {
|
||||
try {
|
||||
yield this.limit.limiter.errorIfWouldGoOverLimit('emails');
|
||||
yield this.reloadSettingsTask.perform();
|
||||
|
||||
if (this.limit.limiter && this.limit.limiter.isLimited('emails')) {
|
||||
yield this.limit.limiter.errorIfWouldGoOverLimit('emails');
|
||||
} else if (this.settings.get('emailVerificationRequired')) {
|
||||
this.set('isSendingEmailLimited', true);
|
||||
this.set('sendingEmailLimitError', 'Email sending is temporarily disabled because your account is currently in review. You should have an email about this from us already, but you can also reach us any time at support@ghost.org.');
|
||||
this.set('sendEmailWhenPublished', 'none');
|
||||
return;
|
||||
}
|
||||
|
||||
this.set('isSendingEmailLimited', false);
|
||||
this.set('sendingEmailLimitError', null);
|
||||
|
@ -359,6 +356,10 @@ export default Component.extend({
|
|||
this._cleanup();
|
||||
}),
|
||||
|
||||
reloadSettingsTask: task(function* () {
|
||||
yield this.settings.reload();
|
||||
}),
|
||||
|
||||
save: task(function* ({dropdown} = {}) {
|
||||
let {
|
||||
post,
|
||||
|
|
Loading…
Add table
Reference in a new issue