From a67cb265fc3ab56e1b34b4a035981d3ba4d4e0b3 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 27 Sep 2022 13:19:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20error=20preventing=20pub?= =?UTF-8?q?lish=20for=20non-Admin=20staff=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/Ghost/commit/e3db911108a1d0ead300532339d048cc72702bc0 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. --- ghost/admin/app/utils/publish-options.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ghost/admin/app/utils/publish-options.js b/ghost/admin/app/utils/publish-options.js index b3f6828e05..a45490ca75 100644 --- a/ghost/admin/app/utils/publish-options.js +++ b/ghost/admin/app/utils/publish-options.js @@ -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');