mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
🐛 Fixed error preventing publish for non-Admin staff users
refs e3db911108
Contributors/Authors/Editors do not have permissions to fetch members so the request to fetch a member count when checking member host limits fails and blocked publishing because it was treated like a failed limit check.
- prevented the up-front limit check from running for non-Admin staff users. Publishing will still fail for other users if the site is over the hosting plan members limit but the error will be shown later in the flow when the actual publish request is made.
This commit is contained in:
parent
e2d02131aa
commit
a67cb265fc
@ -383,6 +383,11 @@ export default class PublishOptions {
|
||||
}
|
||||
|
||||
async _checkPublishingLimit() {
|
||||
// non-admin users cannot fetch members count so we can't error at this stage for them
|
||||
if (!this.user.isAdmin) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (this.limit.limiter?.isLimited('members')) {
|
||||
await this.limit.limiter.errorIfIsOverLimit('members');
|
||||
|
Loading…
Reference in New Issue
Block a user