diff --git a/core/server/services/auth/authorize.js b/core/server/services/auth/authorize.js index 05cefaca0c..ef8189a142 100644 --- a/core/server/services/auth/authorize.js +++ b/core/server/services/auth/authorize.js @@ -52,7 +52,8 @@ const authorize = { return next(); } return next(new common.errors.NoPermissionError({ - message: common.i18n.t('errors.middleware.auth.pleaseSignInOrAuthenticate') + message: common.i18n.t('errors.middleware.auth.authorizationFailed'), + context: common.i18n.t('errors.middleware.auth.missingContentMemberOrIntegration') })); }, @@ -70,7 +71,8 @@ const authorize = { return next(); } else { return next(new common.errors.NoPermissionError({ - message: common.i18n.t('errors.middleware.auth.pleaseSignInOrAuthenticate') + message: common.i18n.t('errors.middleware.auth.authorizationFailed'), + context: common.i18n.t('errors.middleware.auth.missingAdminUserOrIntegration') })); } } diff --git a/core/server/translations/en.json b/core/server/translations/en.json index 350d6a014d..cea78c9d18 100644 --- a/core/server/translations/en.json +++ b/core/server/translations/en.json @@ -78,7 +78,9 @@ "missingUserIDForSession": "Cannot create session without user id.", "accessDenied": "Access denied.", "pleaseSignIn": "Please Sign In", - "pleaseSignInOrAuthenticate": "Please sign in or authenticate with an API Key", + "authorizationFailed": "Authorization failed", + "missingContentMemberOrIntegration": "Unable to determine the authenticated member or integration. Check the supplied Content API Key and ensure cookies are being passed through if member auth is failing.", + "missingAdminUserOrIntegration": "Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.", "adminApiKeyMissing": "Admin API Key missing.", "unknownAdminApiKey": "Unknown Admin API Key", "unknownContentApiKey": "Unknown Content API Key",