mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Allowed Editor and Author roles to see email options when publishing
no issue - there are no restrictions on Editor/Author emailing on the API side - removed `user.canEmail` computed property as it's only contributors that don't have publish/email permissions and they aren't shown the publishing flow anyway
This commit is contained in:
parent
d36517fb1e
commit
4c0c5dcac6
@ -54,8 +54,6 @@ export default BaseModel.extend(ValidationEngine, {
|
||||
isAdmin: or('isOwnerOnly', 'isAdminOnly'),
|
||||
isAuthorOrContributor: or('isAuthor', 'isContributor'),
|
||||
|
||||
canEmail: or('isAdmin', 'isEditor'),
|
||||
|
||||
isLoggedIn: computed('id', 'session.user.id', function () {
|
||||
return this.id === this.get('session.user.id');
|
||||
}),
|
||||
|
@ -108,7 +108,7 @@ export default class PublishOptions {
|
||||
|
||||
// publish type dropdown is not shown at all
|
||||
get emailUnavailable() {
|
||||
return this.post.isPage || this.post.email || !this.user.canEmail || this.emailDisabledInSettings;
|
||||
return this.post.isPage || this.post.email || this.emailDisabledInSettings;
|
||||
}
|
||||
|
||||
// publish type dropdown is shown but email options are disabled
|
||||
@ -252,15 +252,10 @@ export default class PublishOptions {
|
||||
this.totalMemberCount = 1;
|
||||
}
|
||||
|
||||
// only perform limit checks and newsletter fetches if the
|
||||
// current user is allowed to email, otherwise we can hit API
|
||||
// permission errors
|
||||
if (this.user.canEmail) {
|
||||
// email limits
|
||||
promises.push(this._checkSendingLimit());
|
||||
// newsletters
|
||||
promises.push(this.store.query('newsletter', {status: 'active', limit: 'all', include: 'count.members'}));
|
||||
}
|
||||
|
||||
yield Promise.all(promises);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user