From 5513cfbbdb4241fcbd0d01eabfdf2ae7e31287d7 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 27 Sep 2022 13:19:02 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20error=20preventing?= =?UTF-8?q?=20publish=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 ea79000466..960774ad44 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'); From effe66e3a5882b55b203219152416358a125ce43 Mon Sep 17 00:00:00 2001 From: Ghost CI <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 13:45:58 +0100 Subject: [PATCH 2/2] v5.16.2 --- ghost/admin/package.json | 2 +- ghost/core/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/admin/package.json b/ghost/admin/package.json index 0d2f980e7b..04c1833a72 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -1,6 +1,6 @@ { "name": "ghost-admin", - "version": "5.16.1", + "version": "5.16.2", "description": "Ember.js admin client for Ghost", "author": "Ghost Foundation", "homepage": "http://ghost.org", diff --git a/ghost/core/package.json b/ghost/core/package.json index 5a8e761196..b8d6dac316 100644 --- a/ghost/core/package.json +++ b/ghost/core/package.json @@ -1,6 +1,6 @@ { "name": "ghost", - "version": "5.16.1", + "version": "5.16.2", "description": "The professional publishing platform", "author": "Ghost Foundation", "homepage": "https://ghost.org",