*/
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';
AlmSettingsBindingStatus,
isBitbucketCloudBindingDefinition,
} from '../../../../types/alm-settings';
+import { EditionKey } from '../../../../types/editions';
import { Dict } from '../../../../types/types';
import AlmBindingDefinitionBox from './AlmBindingDefinitionBox';
import AlmBindingDefinitionForm from './AlmBindingDefinitionForm';
AlmKeys.BitbucketServer,
];
-export default function AlmTabRenderer(props: AlmTabRendererProps) {
+function AlmTabRenderer(props: AlmTabRendererProps & WithAppStateContextProps) {
const {
almTab,
+ appState: { edition },
branchesEnabled,
definitions,
definitionStatus,
const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0);
+ const isCommunityEdition = edition === EditionKey.community;
+
return (
<div
className="bordered"
<Alert variant="info" className="spacer">
<FormattedMessage
id="settings.almintegration.tabs.authentication-moved"
- defaultMessage={translate('settings.almintegration.tabs.authentication_moved')}
+ defaultMessage={
+ isCommunityEdition
+ ? translate('settings.almintegration.tabs.community_edition_cannot_delegate_auth')
+ : translate('settings.almintegration.tabs.authentication_moved')
+ }
values={{
link: (
<Link
</div>
);
}
+
+export default withAppStateContext(AlmTabRenderer);
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