From 1e297c135a922f1a1049ed9ff5169f25e19658d8 Mon Sep 17 00:00:00 2001 From: Revanshu Paliwal Date: Wed, 24 Aug 2022 14:58:56 +0200 Subject: [PATCH] SONAR-17226 Display authentication-related settings in a more intuitive way --- .../auth/bitbucket/BitbucketSettings.java | 12 +- .../org/sonar/auth/github/GitHubSettings.java | 3 +- .../org/sonar/auth/gitlab/GitLabSettings.java | 3 +- .../org/sonar/auth/saml/SamlSettings.java | 2 +- .../analysis/bitbucket-cloud-integration.md | 4 +- .../pages/analysis/bitbucket-integration.md | 2 +- .../src/pages/analysis/github-integration.md | 4 +- .../src/pages/analysis/gitlab-integration.md | 2 +- .../components/AdditionalCategories.tsx | 2 +- .../almIntegration/AlmIntegration.tsx | 6 +- .../almIntegration/AlmIntegrationRenderer.tsx | 6 +- .../components/almIntegration/AlmTab.tsx | 6 +- .../almIntegration/AlmTabRenderer.tsx | 44 +++-- .../__tests__/AlmIntegration-test.tsx | 1 - .../__tests__/AlmIntegrationRenderer-test.tsx | 1 - .../almIntegration/__tests__/AlmTab-test.tsx | 1 - .../__tests__/AlmTabRenderer-test.tsx | 1 - .../AlmIntegration-test.tsx.snap | 1 - .../AlmIntegrationRenderer-test.tsx.snap | 6 - .../__snapshots__/AlmTab-test.tsx.snap | 1 - .../AlmTabRenderer-test.tsx.snap | 162 +++--------------- .../resources/org/sonar/l10n/core.properties | 18 +- 22 files changed, 77 insertions(+), 211 deletions(-) diff --git a/server/sonar-auth-bitbucket/src/main/java/org/sonar/auth/bitbucket/BitbucketSettings.java b/server/sonar-auth-bitbucket/src/main/java/org/sonar/auth/bitbucket/BitbucketSettings.java index 0cc496bf99d..29b9bdb203e 100755 --- a/server/sonar-auth-bitbucket/src/main/java/org/sonar/auth/bitbucket/BitbucketSettings.java +++ b/server/sonar-auth-bitbucket/src/main/java/org/sonar/auth/bitbucket/BitbucketSettings.java @@ -23,7 +23,6 @@ import java.util.Arrays; import java.util.List; import java.util.function.Supplier; import javax.annotation.CheckForNull; -import org.sonar.api.CoreProperties; import org.sonar.api.PropertyType; import org.sonar.api.config.Configuration; import org.sonar.api.config.PropertyDefinition; @@ -40,6 +39,7 @@ public class BitbucketSettings { public static final String WORKSPACE_ALLOWED_LIST = "sonar.auth.bitbucket.workspaces"; public static final String DEFAULT_API_URL = "https://api.bitbucket.org/"; public static final String DEFAULT_WEB_URL = "https://bitbucket.org/"; + public static final String CATEGORY = "authentication"; public static final String SUBCATEGORY = "bitbucket"; private final Configuration config; @@ -83,7 +83,7 @@ public class BitbucketSettings { PropertyDefinition.builder(ENABLED) .name("Enabled") .description("Enable Bitbucket users to login. Value is ignored if consumer key and secret are not defined.") - .category(CoreProperties.CATEGORY_ALM_INTEGRATION) + .category(CATEGORY) .subCategory(SUBCATEGORY) .type(PropertyType.BOOLEAN) .defaultValue(String.valueOf(false)) @@ -92,21 +92,21 @@ public class BitbucketSettings { PropertyDefinition.builder(CONSUMER_KEY) .name("OAuth consumer key") .description("Consumer key provided by Bitbucket when registering the consumer.") - .category(CoreProperties.CATEGORY_ALM_INTEGRATION) + .category(CATEGORY) .subCategory(SUBCATEGORY) .index(2) .build(), PropertyDefinition.builder(CONSUMER_SECRET) .name("OAuth consumer secret") .description("Consumer secret provided by Bitbucket when registering the consumer.") - .category(CoreProperties.CATEGORY_ALM_INTEGRATION) + .category(CATEGORY) .subCategory(SUBCATEGORY) .index(3) .build(), PropertyDefinition.builder(ALLOW_USERS_TO_SIGN_UP) .name("Allow users to sign-up") .description("Allow new users to authenticate. When set to 'false', only existing users will be able to authenticate.") - .category(CoreProperties.CATEGORY_ALM_INTEGRATION) + .category(CATEGORY) .subCategory(SUBCATEGORY) .type(PropertyType.BOOLEAN) .defaultValue(String.valueOf(true)) @@ -115,7 +115,7 @@ public class BitbucketSettings { PropertyDefinition.builder(WORKSPACE_ALLOWED_LIST) .name("Workspaces") .description("Only members of at least one of these workspace will be able to authenticate. Keep empty to disable workspace restriction. You can use either the workspace name, or the workspace slug (ex: https://bitbucket.org/{workspace-slug}).") - .category(CoreProperties.CATEGORY_ALM_INTEGRATION) + .category(CATEGORY) .subCategory(SUBCATEGORY) .multiValues(true) .index(5) diff --git a/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java b/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java index 2ad356af878..f95d23a2a2e 100644 --- a/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java +++ b/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java @@ -23,7 +23,6 @@ import java.util.Arrays; import java.util.List; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.sonar.api.CoreProperties; import org.sonar.api.config.Configuration; import org.sonar.api.config.PropertyDefinition; @@ -43,7 +42,7 @@ public class GitHubSettings { public static final String WEB_URL = "sonar.auth.github.webUrl"; public static final String ORGANIZATIONS = "sonar.auth.github.organizations"; - private static final String CATEGORY = CoreProperties.CATEGORY_ALM_INTEGRATION; + private static final String CATEGORY = "authentication"; private static final String SUBCATEGORY = "github"; private final Configuration configuration; diff --git a/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GitLabSettings.java b/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GitLabSettings.java index 65e63d406cd..76c69055831 100644 --- a/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GitLabSettings.java +++ b/server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GitLabSettings.java @@ -21,7 +21,6 @@ package org.sonar.auth.gitlab; import java.util.Arrays; import java.util.List; -import org.sonar.api.CoreProperties; import org.sonar.api.PropertyType; import org.sonar.api.config.Configuration; import org.sonar.api.config.PropertyDefinition; @@ -39,7 +38,7 @@ public class GitLabSettings { public static final String GITLAB_AUTH_ALLOW_USERS_TO_SIGNUP = "sonar.auth.gitlab.allowUsersToSignUp"; public static final String GITLAB_AUTH_SYNC_USER_GROUPS = "sonar.auth.gitlab.groupsSync"; - private static final String CATEGORY = CoreProperties.CATEGORY_ALM_INTEGRATION; + private static final String CATEGORY = "authentication"; private static final String SUBCATEGORY = "gitlab"; private final Configuration configuration; diff --git a/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlSettings.java b/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlSettings.java index e654958327a..4954076f41e 100644 --- a/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlSettings.java +++ b/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlSettings.java @@ -50,7 +50,7 @@ public class SamlSettings { public static final String SERVICE_PROVIDER_CERTIFICATE = "sonar.auth.saml.sp.certificate.secured"; public static final String SERVICE_PROVIDER_PRIVATE_KEY = "sonar.auth.saml.sp.privateKey.secured"; - public static final String CATEGORY = "security"; + public static final String CATEGORY = "authentication"; public static final String SUBCATEGORY = "saml"; private final Configuration configuration; diff --git a/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md b/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md index 39613b35721..74148fe21e3 100644 --- a/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md +++ b/server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md @@ -34,7 +34,7 @@ SonarQube uses a dedicated [OAuth consumer](https://support.atlassian.com/bitbuc - **Permissions** – Grant **Read** access for the **Pull requests** permission. ### Setting your global DevOps Platform Integration settings -To set your global DevOps Platform Integration settings, navigate to **Administration > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Cloud** as the variant you want to configure. From here, specify the following settings: +To set your global DevOps Platform Integration settings, navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Cloud** as the variant you want to configure. From here, specify the following settings: - **Configuration Name** (Enterprise and Data Center Edition only) – The name used to identify your Bitbucket Cloud configuration at the project level. Use something succinct and easily recognizable. - **Workspace ID** – The workspace ID is part of your bitbucket cloud URL `https://bitbucket.org/{WORKSPACE-ID}/{repository-slug}` @@ -315,7 +315,7 @@ Create or update your OAuth consumer in your Bitbucket Cloud workspace settings | If you're using the same OAuth consumer for authentication and importing projects/reporting status to pull requests, make sure that the **This is a private consumer** box is checked and **Read** access for the **Pull requests** permission is granted. ### Setting your authentication settings in SonarQube -To set your global authentication settings, navigate to **Administration > DevOps Platform Integrations** and select the **Bitbucket** tab. Scroll down to the **Bitbucket Authentication** section and update the following settings: +To set your global authentication settings, navigate to **Administration > Configuration > General Settings > Authentication > Bitbucket Cloud Authentication** and update the following settings: - **Enabled** - set to true. - **OAuth consumer key** - enter the **Key** from your OAuth consumer page in Bitbucket. diff --git a/server/sonar-docs/src/pages/analysis/bitbucket-integration.md b/server/sonar-docs/src/pages/analysis/bitbucket-integration.md index d27ebed9c75..67042b104d5 100644 --- a/server/sonar-docs/src/pages/analysis/bitbucket-integration.md +++ b/server/sonar-docs/src/pages/analysis/bitbucket-integration.md @@ -27,7 +27,7 @@ To set up the import of BitBucket Server repositories: 1. Add a personal access token for importing repositories ### Setting your global DevOps Platform Integration settings -To set your global DevOps Platform Integration settings, navigate to **Administration > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Server** as the variant you want to configure. From here, specify the following settings: +To set your global DevOps Platform Integration settings, navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations**, select the **Bitbucket** tab, and select **Bitbucket Server** as the variant you want to configure. From here, specify the following settings: - **Configuration Name** (Enterprise and Data Center Edition only) – The name used to identify your Bitbucket Server configuration at the project level. Use something succinct and easily recognizable. - **Bitbucket Server URL** – your instances URL. For example, `https://bitbucket-server.your-company.com`. diff --git a/server/sonar-docs/src/pages/analysis/github-integration.md b/server/sonar-docs/src/pages/analysis/github-integration.md index c7bbf4a9879..4b5eec32948 100644 --- a/server/sonar-docs/src/pages/analysis/github-integration.md +++ b/server/sonar-docs/src/pages/analysis/github-integration.md @@ -351,7 +351,7 @@ To allow users to log in with GitHub credentials, use the GitHub App that you cr To update your global SonarQube settings: -Navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication** and update the following: +Navigate to **Administration > Configuration > General Settings > Authentication > GitHub Authentication** and update the following: 1. **Enabled** – set the switch to `true`. 1. **Client ID** – the Client ID is found below the GitHub App ID on your GitHub App's page. @@ -367,7 +367,7 @@ If you want to use a dedicated app for GitHub authentication, you can create a G After creating your app, update your global SonarQube settings: -Navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitHub > GitHub Authentication** and update the following: +Navigate to **Administration > Configuration > General Settings > Authentication > GitHub Authentication** and update the following: 1. **Enabled** – set the switch to `true`. 1. **Client ID** – the Client ID is found below the GitHub App ID on your GitHub App's page. diff --git a/server/sonar-docs/src/pages/analysis/gitlab-integration.md b/server/sonar-docs/src/pages/analysis/gitlab-integration.md index 032cd5102c0..47fffb297af 100644 --- a/server/sonar-docs/src/pages/analysis/gitlab-integration.md +++ b/server/sonar-docs/src/pages/analysis/gitlab-integration.md @@ -30,7 +30,7 @@ Specify the following settings in your OAuth app: - **Redirect URI** – enter your SonarQube URL with the path `/oauth2/callback/gitlab`. For example, `https://sonarqube.mycompany.com/oauth2/callback/gitlab`. - **Scopes** – select **api** if you plan to enable group synchronization. Select **read_user** if you only plan to delegate authentication. -After saving your application, GitLab takes you to the app's page. Here you find your **Application ID** and **Secret**. Keep these handy, open your SonarQube instance, and navigate to **Administration > Configuration > General Settings > DevOps Platform Integrations > GitLab > Authentication**. Set the following settings to finish setting up GitLab authentication: +After saving your application, GitLab takes you to the app's page. Here you find your **Application ID** and **Secret**. Keep these handy, open your SonarQube instance, and navigate to **Administration > Configuration > General Settings > Authentication > GitLab Authentication**. Set the following settings to finish setting up GitLab authentication: - **Enabled** – set to `true`. - **Application ID** – the Application ID is found on your GitLab app's page. diff --git a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx index 7b3c78f583a..1737728d02c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx @@ -82,7 +82,7 @@ export const ADDITIONAL_CATEGORIES: AdditionalCategory[] = [ renderComponent: getAlmIntegrationComponent, availableGlobally: true, availableForProject: false, - displayTab: false + displayTab: true }, { key: PULL_REQUEST_DECORATION_BINDING_CATEGORY, diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx index 127c0c1ca5b..bb471ee144e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx @@ -34,13 +34,11 @@ import { AlmSettingsBindingStatusType } from '../../../../types/alm-settings'; import { AppState } from '../../../../types/appstate'; -import { ExtendedSettingDefinition } from '../../../../types/settings'; import { Dict } from '../../../../types/types'; import AlmIntegrationRenderer from './AlmIntegrationRenderer'; interface Props { appState: AppState; - definitions: ExtendedSettingDefinition[]; location: Location; router: Router; } @@ -212,8 +210,7 @@ export class AlmIntegration extends React.PureComponent { render() { const { - appState: { branchesEnabled, multipleAlmEnabled }, - definitions: settingsDefinitions + appState: { branchesEnabled, multipleAlmEnabled } } = this.props; const { currentAlmTab, @@ -242,7 +239,6 @@ export class AlmIntegration extends React.PureComponent { loadingAlmDefinitions={loadingAlmDefinitions} loadingProjectCount={loadingProjectCount} projectCount={projectCount} - settingsDefinitions={settingsDefinitions} /> ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx index 414d9608583..769a2b2d79e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx @@ -26,7 +26,6 @@ import { AlmSettingsBindingDefinitions, AlmSettingsBindingStatus } from '../../../../types/alm-settings'; -import { ExtendedSettingDefinition } from '../../../../types/settings'; import { Dict } from '../../../../types/types'; import { AlmTabs } from './AlmIntegration'; import AlmTab from './AlmTab'; @@ -48,7 +47,6 @@ export interface AlmIntegrationRendererProps { onSelectAlmTab: (alm: AlmTabs) => void; onUpdateDefinitions: () => void; projectCount?: number; - settingsDefinitions: ExtendedSettingDefinition[]; } const tabs = [ @@ -120,8 +118,7 @@ export default function AlmIntegrationRenderer(props: AlmIntegrationRendererProp loadingProjectCount, branchesEnabled, multipleAlmEnabled, - projectCount, - settingsDefinitions + projectCount } = props; const bindingDefinitions = { @@ -154,7 +151,6 @@ export default function AlmIntegrationRenderer(props: AlmIntegrationRendererProp onCheck={props.onCheckConfiguration} onDelete={props.onDelete} onUpdateDefinitions={props.onUpdateDefinitions} - settingsDefinitions={settingsDefinitions} /> {definitionKeyForDeletion && ( diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx index a9b33a1d995..95c05874c1b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx @@ -23,7 +23,6 @@ import { AlmBindingDefinitionBase, AlmSettingsBindingStatus } from '../../../../types/alm-settings'; -import { ExtendedSettingDefinition } from '../../../../types/settings'; import { Dict } from '../../../../types/types'; import { AlmTabs } from './AlmIntegration'; import AlmTabRenderer from './AlmTabRenderer'; @@ -39,7 +38,6 @@ interface Props { onCheck: (definitionKey: string) => void; onDelete: (definitionKey: string) => void; onUpdateDefinitions: () => void; - settingsDefinitions: ExtendedSettingDefinition[]; } interface State { @@ -93,8 +91,7 @@ export default class AlmTab extends React.PureComponent { definitionStatus, loadingAlmDefinitions, loadingProjectCount, - multipleAlmEnabled, - settingsDefinitions + multipleAlmEnabled } = this.props; const { editDefinition, editedDefinition } = this.state; @@ -115,7 +112,6 @@ export default class AlmTab extends React.PureComponent { onEdit={this.handleEdit} onCancel={this.handleCancel} afterSubmit={this.handleAfterSubmit} - settingsDefinitions={settingsDefinitions} /> ); } 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 12482862a20..0ed12fa6221 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 @@ -18,7 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; +import { Link } from 'react-router-dom'; import { Button } from '../../../../components/controls/buttons'; +import { Alert } from '../../../../components/ui/Alert'; import DeferredSpinner from '../../../../components/ui/DeferredSpinner'; import { translate } from '../../../../helpers/l10n'; import { @@ -28,10 +31,7 @@ import { AlmSettingsBindingStatus, isBitbucketCloudBindingDefinition } from '../../../../types/alm-settings'; -import { ExtendedSettingDefinition } from '../../../../types/settings'; import { Dict } from '../../../../types/types'; -import { ALM_INTEGRATION_CATEGORY } from '../../constants'; -import CategoryDefinitionsList from '../CategoryDefinitionsList'; import AlmBindingDefinitionBox from './AlmBindingDefinitionBox'; import AlmBindingDefinitionForm from './AlmBindingDefinitionForm'; import { AlmTabs } from './AlmIntegration'; @@ -53,9 +53,14 @@ export interface AlmTabRendererProps { onDelete: (definitionKey: string) => void; onEdit: (definitionKey: string) => void; afterSubmit: (config: AlmBindingDefinitionBase) => void; - settingsDefinitions: ExtendedSettingDefinition[]; } +const AUTHENTICATION_AVAILABLE_PLATFORMS = [ + AlmKeys.GitHub, + AlmKeys.GitLab, + AlmKeys.BitbucketServer +]; + export default function AlmTabRenderer(props: AlmTabRendererProps) { const { almTab, @@ -66,8 +71,7 @@ export default function AlmTabRenderer(props: AlmTabRendererProps) { editedDefinition, loadingAlmDefinitions, loadingProjectCount, - multipleAlmEnabled, - settingsDefinitions + multipleAlmEnabled } = props; const preventCreation = loadingProjectCount || (!multipleAlmEnabled && definitions.length > 0); @@ -115,16 +119,24 @@ export default function AlmTabRenderer(props: AlmTabRendererProps) { )} - -
- -
- -
+ {AUTHENTICATION_AVAILABLE_PLATFORMS.includes(almTab) && ( + + + {translate('property.category.authentication')} + + ) + }} + /> + + )}
); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx index aa701feea92..4b3fad35c24 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx @@ -190,7 +190,6 @@ function shallowRender(props: Partial = {}) { return shallow( = {}) { onDelete={jest.fn()} onSelectAlmTab={jest.fn()} onUpdateDefinitions={jest.fn()} - settingsDefinitions={[]} {...props} /> ); diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx index 260132fa317..7fbd2c73f0c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx @@ -86,7 +86,6 @@ function shallowRender(props: Partial = {}) { onCheck={jest.fn()} onDelete={jest.fn()} onUpdateDefinitions={jest.fn()} - settingsDefinitions={[]} {...props} /> ); diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTabRenderer-test.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTabRenderer-test.tsx index 6b55ee46e7a..76bb366affb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTabRenderer-test.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTabRenderer-test.tsx @@ -104,7 +104,6 @@ function shallowRender(props: Partial = {}) { onDelete={jest.fn()} onEdit={jest.fn()} afterSubmit={jest.fn()} - settingsDefinitions={[]} {...props} /> ); diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegration-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegration-test.tsx.snap index 561988375f7..193dfaf0360 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegration-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegration-test.tsx.snap @@ -23,6 +23,5 @@ exports[`should render correctly 1`] = ` onDelete={[Function]} onSelectAlmTab={[Function]} onUpdateDefinitions={[Function]} - settingsDefinitions={Array []} /> `; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegrationRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegrationRenderer-test.tsx.snap index 8a6aa95355a..dbbe5ea825c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegrationRenderer-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegrationRenderer-test.tsx.snap @@ -83,7 +83,6 @@ exports[`should render correctly: azure 1`] = ` onCheck={[MockFunction]} onDelete={[MockFunction]} onUpdateDefinitions={[MockFunction]} - settingsDefinitions={Array []} /> `; @@ -171,7 +170,6 @@ exports[`should render correctly: bitbucket 1`] = ` onCheck={[MockFunction]} onDelete={[MockFunction]} onUpdateDefinitions={[MockFunction]} - settingsDefinitions={Array []} /> `; @@ -259,7 +257,6 @@ exports[`should render correctly: default 1`] = ` onCheck={[MockFunction]} onDelete={[MockFunction]} onUpdateDefinitions={[MockFunction]} - settingsDefinitions={Array []} /> `; @@ -347,7 +344,6 @@ exports[`should render correctly: delete modal 1`] = ` onCheck={[MockFunction]} onDelete={[MockFunction]} onUpdateDefinitions={[MockFunction]} - settingsDefinitions={Array []} /> `; @@ -528,7 +523,6 @@ exports[`should render correctly: loading 1`] = ` onCheck={[MockFunction]} onDelete={[MockFunction]} onUpdateDefinitions={[MockFunction]} - settingsDefinitions={Array []} /> `; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap index 38897cfa773..ae9342d08d0 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap @@ -22,6 +22,5 @@ exports[`should render correctly 1`] = ` onCreate={[Function]} onDelete={[MockFunction]} onEdit={[Function]} - settingsDefinitions={Array []} /> `; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTabRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTabRenderer-test.tsx.snap index b987913a570..4a8a83d0009 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTabRenderer-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTabRenderer-test.tsx.snap @@ -43,18 +43,6 @@ exports[`should render correctly for multi-ALM binding: editing a definition 1`] /> -
-
- -
`; @@ -101,18 +89,6 @@ exports[`should render correctly for multi-ALM binding: loaded 1`] = ` /> -
-
- -
`; @@ -159,18 +135,6 @@ exports[`should render correctly for multi-ALM binding: loading ALM definitions /> -
-
- -
`; @@ -217,18 +181,6 @@ exports[`should render correctly for multi-ALM binding: loading project count 1` /> -
-
- -
`; @@ -275,18 +227,6 @@ exports[`should render correctly for single-ALM binding 1`] = ` /> -
-
- -
`; @@ -333,18 +273,6 @@ exports[`should render correctly for single-ALM binding 2`] = ` /> -
-
- -
`; @@ -391,18 +319,6 @@ exports[`should render correctly for single-ALM binding 3`] = ` /> -
-
- -
`; @@ -439,18 +355,6 @@ exports[`should render correctly with validation: create a first 1`] = ` -
-
- -
`; @@ -501,18 +405,6 @@ exports[`should render correctly with validation: create a second 1`] = ` /> -
-
- -
`; @@ -563,18 +455,6 @@ exports[`should render correctly with validation: default 1`] = ` /> -
-
- -
`; @@ -611,18 +491,6 @@ exports[`should render correctly with validation: empty 1`] = ` -
-
- -
`; @@ -671,17 +539,27 @@ exports[`should render correctly with validation: pass the correct key for bitbu /> -
-
- + property.category.authentication + , + } + } /> -
+
`; 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 8f82d26b541..6e857004fa2 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1250,6 +1250,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.multiple=This feature is disabled because you have 2 or more integration instances configured. 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.pr_decoration.binding.category=DevOps Platform Integration settings.pr_decoration.binding.no_bindings=A system administrator needs to enable this feature in the global settings. @@ -1297,17 +1298,18 @@ property.category.general.issues=Issues property.category.general.qualityGate=Quality Gate property.category.general.subProjects=Sub-projects property.category.almintegration=DevOps Platform Integrations -property.category.almintegration.github=GitHub Authentication -property.category.almintegration.github.description=In order to enable authentication on GitHub.com or GitHub Enterprise:
  • SonarQube must be publicly accessible through HTTPS only
  • The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL
  • In your GitHub profile, you need to create a Developer Application for which the 'Authorization callback URL' must be set to '<value_of_sonar.core.serverBaseURL_property>/oauth2/callback'.
-property.category.almintegration.gitlab=GitLab Authentication -property.category.almintegration.gitlab.description=In order to enable GitLab authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL -property.category.almintegration.bitbucket=Bitbucket Cloud Authentication -property.category.almintegration.bitbucket.description=In order to enable authentication on Bitbucket.org:
  • SonarQube must be publicly accessible through HTTPS only
  • The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL
  • In your Bitbucket OAuth Consumer settings, 'Callback URL' must be set to '<value_of_sonar.core.serverBaseURL_property>'.
+property.category.authentication=Authentication +property.category.authentication.github=GitHub Authentication +property.category.authentication.github.description=In order to enable authentication on GitHub.com or GitHub Enterprise:
  • SonarQube must be publicly accessible through HTTPS only
  • The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL
  • In your GitHub profile, you need to create a Developer Application for which the 'Authorization callback URL' must be set to '<value_of_sonar.core.serverBaseURL_property>/oauth2/callback'.
+property.category.authentication.gitlab=GitLab Authentication +property.category.authentication.gitlab.description=In order to enable GitLab authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL +property.category.authentication.bitbucket=Bitbucket Cloud Authentication +property.category.authentication.bitbucket.description=In order to enable authentication on Bitbucket.org:
  • SonarQube must be publicly accessible through HTTPS only
  • The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL
  • In your Bitbucket OAuth Consumer settings, 'Callback URL' must be set to '<value_of_sonar.core.serverBaseURL_property>'.
+property.category.authentication.saml=SAML +property.category.authentication.saml.description=In order to enable SAML authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL property.category.organizations=Organizations property.category.security=Security property.category.security.encryption=Encryption -property.category.security.saml=SAML -property.category.security.saml.description=In order to enable SAML authentication, the property 'sonar.core.serverBaseURL' must be set to the public URL property.category.java=Java property.category.differentialViews=New Code property.category.codeCoverage=Code Coverage -- 2.39.5