From f3c6028e0053dc2dfc4d80c7ad7c0386bbc07c04 Mon Sep 17 00:00:00 2001 From: wangsijie Date: Tue, 6 Feb 2024 10:46:18 +0800 Subject: [PATCH] fix(core,phrases): add notice that protected app is cloud only (#5385) --- .../application-protected-app-metadata.openapi.json | 6 +++--- .../core/src/routes/applications/application.openapi.json | 2 +- packages/core/src/routes/init.ts | 2 +- packages/phrases/src/locales/de/errors/application.ts | 3 ++- packages/phrases/src/locales/en/errors/application.ts | 3 ++- packages/phrases/src/locales/es/errors/application.ts | 3 ++- packages/phrases/src/locales/fr/errors/application.ts | 3 ++- packages/phrases/src/locales/it/errors/application.ts | 3 ++- packages/phrases/src/locales/ja/errors/application.ts | 3 ++- packages/phrases/src/locales/ko/errors/application.ts | 3 ++- packages/phrases/src/locales/pl-pl/errors/application.ts | 3 ++- packages/phrases/src/locales/pt-br/errors/application.ts | 3 ++- packages/phrases/src/locales/pt-pt/errors/application.ts | 3 ++- packages/phrases/src/locales/ru/errors/application.ts | 3 ++- packages/phrases/src/locales/tr-tr/errors/application.ts | 3 ++- packages/phrases/src/locales/zh-cn/errors/application.ts | 3 ++- packages/phrases/src/locales/zh-hk/errors/application.ts | 3 ++- packages/phrases/src/locales/zh-tw/errors/application.ts | 3 ++- 18 files changed, 35 insertions(+), 20 deletions(-) diff --git a/packages/core/src/routes/applications/application-protected-app-metadata.openapi.json b/packages/core/src/routes/applications/application-protected-app-metadata.openapi.json index 039c90862..90dd17813 100644 --- a/packages/core/src/routes/applications/application-protected-app-metadata.openapi.json +++ b/packages/core/src/routes/applications/application-protected-app-metadata.openapi.json @@ -3,7 +3,7 @@ "/api/applications/{id}/protected-app-metadata/custom-domains": { "get": { "summary": "Get the list of custom domains of the protected application.", - "description": "Get the list of custom domains of the protected application.", + "description": "Get the list of custom domains of the protected application. This feature is not available for open source version.", "responses": { "200": { "description": "The domain list of the protected application." @@ -15,7 +15,7 @@ }, "post": { "summary": "Add a custom domain to the protected application.", - "description": "Add a custom domain to the protected application. You'll need to setup DNS record later.", + "description": "Add a custom domain to the protected application. You'll need to setup DNS record later. This feature is not available for open source version.", "requestBody": { "content": { "application/json": { @@ -45,7 +45,7 @@ "/api/applications/{id}/protected-app-metadata/custom-domains/{domain}": { "delete": { "summary": "Delete a custom domain.", - "description": "Add a custom domain.", + "description": "Add a custom domain. This feature is not available for open source version.", "responses": { "204": { "description": "The domain has been deleted." diff --git a/packages/core/src/routes/applications/application.openapi.json b/packages/core/src/routes/applications/application.openapi.json index 608c8f84b..62d2503c9 100644 --- a/packages/core/src/routes/applications/application.openapi.json +++ b/packages/core/src/routes/applications/application.openapi.json @@ -32,7 +32,7 @@ "schema": { "properties": { "protectedAppMetadata": { - "description": "The data for protected app.", + "description": "The data for protected app, this feature is not available for open source version.", "properties": { "subDomain": { "description": "The subdomain prefix, e.g., my-site." diff --git a/packages/core/src/routes/init.ts b/packages/core/src/routes/init.ts index 54c19277e..fed92f6c9 100644 --- a/packages/core/src/routes/init.ts +++ b/packages/core/src/routes/init.ts @@ -57,7 +57,7 @@ const createRouters = (tenant: TenantContext) => { applicationUserConsentOrganizationRoutes(managementRouter, tenant); // FIXME: @wangsijie: remove this after the feature is enabled by default - if (EnvSet.values.isDevFeaturesEnabled) { + if (!EnvSet.values.isCloud) { applicationProtectedAppMetadataRoutes(managementRouter, tenant); } diff --git a/packages/phrases/src/locales/de/errors/application.ts b/packages/phrases/src/locales/de/errors/application.ts index d8fd39c90..1f0c1afae 100644 --- a/packages/phrases/src/locales/de/errors/application.ts +++ b/packages/phrases/src/locales/de/errors/application.ts @@ -11,7 +11,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Geschützte App-Metadaten sind erforderlich.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/en/errors/application.ts b/packages/phrases/src/locales/en/errors/application.ts index 281d2622d..feabd176b 100644 --- a/packages/phrases/src/locales/en/errors/application.ts +++ b/packages/phrases/src/locales/en/errors/application.ts @@ -8,7 +8,8 @@ const application = { user_consent_scopes_not_found: 'Invalid user consent scopes.', consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Protected app metadata is required.', - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', protected_application_only: 'The feature is only available for protected applications.', protected_application_misconfigured: 'Protected application is misconfigured.', diff --git a/packages/phrases/src/locales/es/errors/application.ts b/packages/phrases/src/locales/es/errors/application.ts index dc088d0ae..7affa70b8 100644 --- a/packages/phrases/src/locales/es/errors/application.ts +++ b/packages/phrases/src/locales/es/errors/application.ts @@ -11,7 +11,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Se requiere metadatos de aplicación protegida.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/fr/errors/application.ts b/packages/phrases/src/locales/fr/errors/application.ts index 95fa7e087..05de377aa 100644 --- a/packages/phrases/src/locales/fr/errors/application.ts +++ b/packages/phrases/src/locales/fr/errors/application.ts @@ -12,7 +12,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: "Les métadonnées d'application protégée sont requises.", /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/it/errors/application.ts b/packages/phrases/src/locales/it/errors/application.ts index 3534f47c8..9c5665c16 100644 --- a/packages/phrases/src/locales/it/errors/application.ts +++ b/packages/phrases/src/locales/it/errors/application.ts @@ -12,7 +12,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Protected app metadata is required.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/ja/errors/application.ts b/packages/phrases/src/locales/ja/errors/application.ts index 7e0d9be3d..49f23420b 100644 --- a/packages/phrases/src/locales/ja/errors/application.ts +++ b/packages/phrases/src/locales/ja/errors/application.ts @@ -11,7 +11,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Protected app metadata is required.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/ko/errors/application.ts b/packages/phrases/src/locales/ko/errors/application.ts index 155c023af..372cb2f30 100644 --- a/packages/phrases/src/locales/ko/errors/application.ts +++ b/packages/phrases/src/locales/ko/errors/application.ts @@ -10,7 +10,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: '보호된 응용 프로그램 메타데이터가 필요합니다.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/pl-pl/errors/application.ts b/packages/phrases/src/locales/pl-pl/errors/application.ts index 42b6c25e8..4c1c0f365 100644 --- a/packages/phrases/src/locales/pl-pl/errors/application.ts +++ b/packages/phrases/src/locales/pl-pl/errors/application.ts @@ -10,7 +10,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Wymagane jest zabezpieczone metadane aplikacji.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/pt-br/errors/application.ts b/packages/phrases/src/locales/pt-br/errors/application.ts index 97d33657e..644749c43 100644 --- a/packages/phrases/src/locales/pt-br/errors/application.ts +++ b/packages/phrases/src/locales/pt-br/errors/application.ts @@ -11,7 +11,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Protegido metadados do app é necessário.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/pt-pt/errors/application.ts b/packages/phrases/src/locales/pt-pt/errors/application.ts index 354225fbe..5ff0f4b0a 100644 --- a/packages/phrases/src/locales/pt-pt/errors/application.ts +++ b/packages/phrases/src/locales/pt-pt/errors/application.ts @@ -11,7 +11,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Protected app metadata is required.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/ru/errors/application.ts b/packages/phrases/src/locales/ru/errors/application.ts index a7d0ce63d..8af2c1e44 100644 --- a/packages/phrases/src/locales/ru/errors/application.ts +++ b/packages/phrases/src/locales/ru/errors/application.ts @@ -12,7 +12,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Требуется защищенная метаданные приложения.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/tr-tr/errors/application.ts b/packages/phrases/src/locales/tr-tr/errors/application.ts index ada28946c..aa55ef070 100644 --- a/packages/phrases/src/locales/tr-tr/errors/application.ts +++ b/packages/phrases/src/locales/tr-tr/errors/application.ts @@ -10,7 +10,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: 'Protected app metadata is required.', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/zh-cn/errors/application.ts b/packages/phrases/src/locales/zh-cn/errors/application.ts index 1635b8250..1ea5111eb 100644 --- a/packages/phrases/src/locales/zh-cn/errors/application.ts +++ b/packages/phrases/src/locales/zh-cn/errors/application.ts @@ -9,7 +9,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: '需要保护的应用程序元数据。', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/zh-hk/errors/application.ts b/packages/phrases/src/locales/zh-hk/errors/application.ts index 4eecec40f..ff49439d4 100644 --- a/packages/phrases/src/locales/zh-hk/errors/application.ts +++ b/packages/phrases/src/locales/zh-hk/errors/application.ts @@ -9,7 +9,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: '保護應用程式元數據是必需的。', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */ diff --git a/packages/phrases/src/locales/zh-tw/errors/application.ts b/packages/phrases/src/locales/zh-tw/errors/application.ts index 87d6715b2..0ac414396 100644 --- a/packages/phrases/src/locales/zh-tw/errors/application.ts +++ b/packages/phrases/src/locales/zh-tw/errors/application.ts @@ -9,7 +9,8 @@ const application = { consent_management_api_scopes_not_allowed: 'Management API scopes are not allowed.', protected_app_metadata_is_required: '需要保護應用程式元數據。', /** UNTRANSLATED */ - protected_app_not_configured: 'Protected app provider is not configured.', + protected_app_not_configured: + 'Protected app provider is not configured. This feature is not available for open source version.', /** UNTRANSLATED */ cloudflare_unknown_error: 'Got unknown error when requesting Cloudflare API', /** UNTRANSLATED */