mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Fixed 403 newsletters request for contributors when opening editor
closes https://github.com/TryGhost/Team/issues/2242 Contributors don't have permission to fetch `/newsletters/` but the publish flow was sending a request every time a contributor opened a post in the editor creating noise in event logs and in the developer console. - disabled the newsletters fetch when the logged in user is a contributor - contributors can't publish so the "missing" data has no effect on the publish flow as it's not used
This commit is contained in:
parent
58ba154ed7
commit
b68686fe9c
1 changed files with 3 additions and 1 deletions
|
@ -285,7 +285,9 @@ export default class PublishOptions {
|
|||
promises.push(this._checkPublishingLimit());
|
||||
|
||||
// newsletters
|
||||
promises.push(this.store.query('newsletter', {status: 'active', limit: 'all', include: 'count.members'}));
|
||||
if (!this.user.isContributor) {
|
||||
promises.push(this.store.query('newsletter', {status: 'active', limit: 'all', include: 'count.members'}));
|
||||
}
|
||||
|
||||
yield Promise.all(promises);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue