diff --git a/ghost/core/core/server/services/auth/api-key/admin.js b/ghost/core/core/server/services/auth/api-key/admin.js index 6ddd976642..16a6ffa3bf 100644 --- a/ghost/core/core/server/services/auth/api-key/admin.js +++ b/ghost/core/core/server/services/auth/api-key/admin.js @@ -127,7 +127,11 @@ const authenticateWithToken = async (req, res, next, {token, JWT_OPTIONS}) => { // CASE: blocking all non-internal: "custom" and "builtin" integration requests when the limit is reached if (limitService.isLimited('customIntegrations') - && (apiKey.relations.integration && !['internal'].includes(apiKey.relations.integration.get('type')))) { + && (apiKey.relations.integration + && !['internal'].includes(apiKey.relations.integration.get('type')) + && !['ghost-explore'].includes(apiKey.relations.integration.get('slug')) + ) + ) { // NOTE: using "checkWouldGoOverLimit" instead of "checkIsOverLimit" here because flag limits don't have // a concept of measuring if the limit has been surpassed await limitService.errorIfWouldGoOverLimit('customIntegrations'); diff --git a/ghost/core/core/server/services/auth/api-key/content.js b/ghost/core/core/server/services/auth/api-key/content.js index 6dd51bee2b..c6a3a6f6eb 100644 --- a/ghost/core/core/server/services/auth/api-key/content.js +++ b/ghost/core/core/server/services/auth/api-key/content.js @@ -43,7 +43,11 @@ const authenticateContentApiKey = async function authenticateContentApiKey(req, // CASE: blocking all non-internal: "custom" and "builtin" integration requests when the limit is reached if (limitService.isLimited('customIntegrations') - && (apiKey.relations.integration && !['internal'].includes(apiKey.relations.integration.get('type')))) { + && (apiKey.relations.integration + && !['internal'].includes(apiKey.relations.integration.get('type')) + && !['ghost-explore'].includes(apiKey.relations.integration.get('slug')) + ) + ) { // NOTE: using "checkWouldGoOverLimit" instead of "checkIsOverLimit" here because flag limits don't have // a concept of measuring if the limit has been surpassed await limitService.errorIfWouldGoOverLimit('customIntegrations');