🐛 Fixed email preview not visible to Editors

refs https://github.com/TryGhost/Ghost/issues/11841

- Allows editors to see email customization option for sending test newsletters
- Editors had the necessary permission fixtures but the UI was previously only available to owners or administrators
This commit is contained in:
Rish 2020-05-28 14:36:04 +05:30 committed by Rishabh Garg
parent bdd874c01b
commit 05f7ec5dbe
2 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,7 @@
</button> </button>
{{svg-jar "arrow-right"}} {{svg-jar "arrow-right"}}
</li> </li>
{{#if (and this.feature.members (eq this.post.displayName "post") this.session.user.isOwnerOrAdmin)}} {{#if (and this.feature.members (eq this.post.displayName "post") showEmailNewsletter)}}
<li class="nav-list-item" {{action "showSubview" "email-settings"}} data-test-button="email-settings"> <li class="nav-list-item" {{action "showSubview" "email-settings"}} data-test-button="email-settings">
<button type="button"> <button type="button">
<b>Email newsletter</b> <b>Email newsletter</b>

View File

@ -48,6 +48,7 @@ export default Component.extend(SettingsMenuMixin, {
twitterTitle: or('twitterTitleScratch', 'seoTitle'), twitterTitle: or('twitterTitleScratch', 'seoTitle'),
showVisibilityInput: or('session.user.isOwner', 'session.user.isAdmin', 'session.user.isEditor'), showVisibilityInput: or('session.user.isOwner', 'session.user.isAdmin', 'session.user.isEditor'),
showEmailNewsletter: or('session.user.isOwner', 'session.user.isAdmin', 'session.user.isEditor'),
seoTitle: computed('metaTitleScratch', 'post.titleScratch', function () { seoTitle: computed('metaTitleScratch', 'post.titleScratch', function () {
return this.metaTitleScratch || this.post.titleScratch || '(Untitled)'; return this.metaTitleScratch || this.post.titleScratch || '(Untitled)';