From 504189b5ff1e6e5c4b04f08586365a997f13af2c Mon Sep 17 00:00:00 2001 From: David Cho-Lerat Date: Wed, 30 Aug 2023 17:19:23 +0200 Subject: [PATCH] SONAR-19600 Change wording for DevOps platform settings description depending on edition --- .../almIntegration/AlmTabRenderer.tsx | 17 +++++++++++++++-- .../resources/org/sonar/l10n/core.properties | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx index 5096a11a8fc..3e7934d2620 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx @@ -19,6 +19,9 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import withAppStateContext, { + WithAppStateContextProps, +} from '../../../../app/components/app-state/withAppStateContext'; import Link from '../../../../components/common/Link'; import { getTabId, getTabPanelId } from '../../../../components/controls/BoxedTabs'; import { Button } from '../../../../components/controls/buttons'; @@ -32,6 +35,7 @@ import { AlmSettingsBindingStatus, isBitbucketCloudBindingDefinition, } from '../../../../types/alm-settings'; +import { EditionKey } from '../../../../types/editions'; import { Dict } from '../../../../types/types'; import AlmBindingDefinitionBox from './AlmBindingDefinitionBox'; import AlmBindingDefinitionForm from './AlmBindingDefinitionForm'; @@ -62,9 +66,10 @@ const AUTHENTICATION_AVAILABLE_PLATFORMS = [ AlmKeys.BitbucketServer, ]; -export default function AlmTabRenderer(props: AlmTabRendererProps) { +function AlmTabRenderer(props: AlmTabRendererProps & WithAppStateContextProps) { const { almTab, + appState: { edition }, branchesEnabled, definitions, definitionStatus, @@ -77,6 +82,8 @@ export default function AlmTabRenderer(props: AlmTabRendererProps) { const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0); + const isCommunityEdition = edition === EditionKey.community; + return (
); } + +export default withAppStateContext(AlmTabRenderer); diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 3538296fccf..c923765068a 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1469,6 +1469,7 @@ settings.almintegration.feature.alm_repo_import.description=Select repositories settings.almintegration.feature.alm_repo_import.disabled=Disabled settings.almintegration.feature.alm_repo_import.disabled.no_url=This feature is disabled because your configured instance has no URL. settings.almintegration.tabs.authentication_moved=You can delegate authentication to this DevOps Platform. The relevant settings are under the {link} section. +settings.almintegration.tabs.community_edition_cannot_delegate_auth=You cannot delegate authentication to this DevOps Platform with the Community Edition of SonarQube. # Authentication Common settings.authentication.title=Authentication -- 2.39.5