mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +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
ddb9c1b30c
commit
5513cfbbdb
@ -383,6 +383,11 @@ export default class PublishOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _checkPublishingLimit() {
|
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 {
|
try {
|
||||||
if (this.limit.limiter?.isLimited('members')) {
|
if (this.limit.limiter?.isLimited('members')) {
|
||||||
await this.limit.limiter.errorIfIsOverLimit('members');
|
await this.limit.limiter.errorIfIsOverLimit('members');
|
||||||
|
Loading…
Reference in New Issue
Block a user