mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated email role restrictions
no issue. Only admins and owners should have access to sending emails. Updated relevant templates to restrict access to emails for non-admins/owners
This commit is contained in:
parent
727a38d5d1
commit
e866808193
7 changed files with 72 additions and 65 deletions
|
@ -6,6 +6,7 @@ import {inject as service} from '@ember/service';
|
|||
|
||||
export default Component.extend({
|
||||
ghostPaths: service(),
|
||||
session: service(),
|
||||
|
||||
tagName: 'li',
|
||||
classNames: ['gh-list-row', 'gh-posts-list-item'],
|
||||
|
|
|
@ -8,6 +8,7 @@ import {inject as service} from '@ember/service';
|
|||
export default Component.extend({
|
||||
feature: service(),
|
||||
settings: service(),
|
||||
session: service(),
|
||||
post: null,
|
||||
saveType: null,
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ export default Component.extend({
|
|||
|
||||
post: null,
|
||||
saveType: null,
|
||||
session: service(),
|
||||
isClosing: null,
|
||||
|
||||
// used to set minDate in datepicker
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
</button>
|
||||
{{svg-jar "arrow-right"}}
|
||||
</li>
|
||||
{{#if (and this.feature.members (eq this.post.displayName "post"))}}
|
||||
{{#if (and this.feature.members (eq this.post.displayName "post") this.session.user.isOwnerOrAdmin)}}
|
||||
<li class="nav-list-item" {{action "showSubview" "email-settings"}} data-test-button="email-settings">
|
||||
<button type="button">
|
||||
<b>Email newsletter</b>
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if this.session.user.isOwnerOrAdmin}}
|
||||
{{#if (or this.post.email (and this.post.isScheduled this.post.sendEmailWhenPublished))}}
|
||||
{{#if (eq this.post.email.status "failed")}}
|
||||
<span data-tooltip="Failed to send post by email" class="gh-content-status-emailed error">
|
||||
|
@ -60,6 +61,7 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/link-to}}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{#if this.canSendEmail}}
|
||||
{{#if (and this.canSendEmail this.session.user.isOwnerOrAdmin)}}
|
||||
<div class="gh-publishmenu-section">
|
||||
<div class="gh-publishmenu-radio gh-publishmenu-email">
|
||||
{{#if this.backgroundLoader.isRunning}}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{#if this.session.user.isOwnerOrAdmin}}
|
||||
{{#unless this.post.email}}
|
||||
<section class="gh-publishmenu-section">
|
||||
<div class="gh-publishmenu-radio gh-publishmenu-email">
|
||||
|
@ -53,4 +54,5 @@
|
|||
</div>
|
||||
</section>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue