Преглед на файлове

SONAR-17226 Display authentication-related settings in a more intuitive way

tags/9.7.0.61563
Revanshu Paliwal преди 1 година
родител
ревизия
1e297c135a
променени са 22 файла, в които са добавени 77 реда и са изтрити 211 реда
  1. 6
    6
      server/sonar-auth-bitbucket/src/main/java/org/sonar/auth/bitbucket/BitbucketSettings.java
  2. 1
    2
      server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java
  3. 1
    2
      server/sonar-auth-gitlab/src/main/java/org/sonar/auth/gitlab/GitLabSettings.java
  4. 1
    1
      server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlSettings.java
  5. 2
    2
      server/sonar-docs/src/pages/analysis/bitbucket-cloud-integration.md
  6. 1
    1
      server/sonar-docs/src/pages/analysis/bitbucket-integration.md
  7. 2
    2
      server/sonar-docs/src/pages/analysis/github-integration.md
  8. 1
    1
      server/sonar-docs/src/pages/analysis/gitlab-integration.md
  9. 1
    1
      server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx
  10. 1
    5
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx
  11. 1
    5
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx
  12. 1
    5
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx
  13. 28
    16
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
  14. 0
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx
  15. 0
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegrationRenderer-test.tsx
  16. 0
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx
  17. 0
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTabRenderer-test.tsx
  18. 0
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegration-test.tsx.snap
  19. 0
    6
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmIntegrationRenderer-test.tsx.snap
  20. 0
    1
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTab-test.tsx.snap
  21. 20
    142
      server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTabRenderer-test.tsx.snap
  22. 10
    8
      sonar-core/src/main/resources/org/sonar/l10n/core.properties

+ 6
- 6
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)

+ 1
- 2
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;

+ 1
- 2
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;

+ 1
- 1
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;

+ 2
- 2
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.

+ 1
- 1
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`.

+ 2
- 2
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.

+ 1
- 1
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.

+ 1
- 1
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,

+ 1
- 5
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<Props, State> {

render() {
const {
appState: { branchesEnabled, multipleAlmEnabled },
definitions: settingsDefinitions
appState: { branchesEnabled, multipleAlmEnabled }
} = this.props;
const {
currentAlmTab,
@@ -242,7 +239,6 @@ export class AlmIntegration extends React.PureComponent<Props, State> {
loadingAlmDefinitions={loadingAlmDefinitions}
loadingProjectCount={loadingProjectCount}
projectCount={projectCount}
settingsDefinitions={settingsDefinitions}
/>
);
}

+ 1
- 5
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 && (

+ 1
- 5
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<Props, State> {
definitionStatus,
loadingAlmDefinitions,
loadingProjectCount,
multipleAlmEnabled,
settingsDefinitions
multipleAlmEnabled
} = this.props;
const { editDefinition, editedDefinition } = this.state;

@@ -115,7 +112,6 @@ export default class AlmTab extends React.PureComponent<Props, State> {
onEdit={this.handleEdit}
onCancel={this.handleCancel}
afterSubmit={this.handleAfterSubmit}
settingsDefinitions={settingsDefinitions}
/>
);
}

+ 28
- 16
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) {
)}
</DeferredSpinner>
</div>

<div className="huge-spacer-top huge-spacer-bottom bordered-top" />

<div className="big-padded">
<CategoryDefinitionsList
category={ALM_INTEGRATION_CATEGORY}
definitions={settingsDefinitions}
subCategory={almTab}
/>
</div>
{AUTHENTICATION_AVAILABLE_PLATFORMS.includes(almTab) && (
<Alert variant="info" className="spacer">
<FormattedMessage
id="settings.almintegration.tabs.authentication-moved"
defaultMessage={translate('settings.almintegration.tabs.authentication_moved')}
values={{
link: (
<Link
to={{
pathname: '/admin/settings?category=authentication'
}}>
{translate('property.category.authentication')}
</Link>
)
}}
/>
</Alert>
)}
</div>
);
}

+ 0
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-test.tsx Целия файл

@@ -190,7 +190,6 @@ function shallowRender(props: Partial<AlmIntegration['props']> = {}) {
return shallow<AlmIntegration>(
<AlmIntegration
appState={mockAppState({ branchesEnabled: true })}
definitions={[]}
location={mockLocation()}
router={mockRouter()}
{...props}

+ 0
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegrationRenderer-test.tsx Целия файл

@@ -51,7 +51,6 @@ function shallowRender(props: Partial<AlmIntegrationRendererProps> = {}) {
onDelete={jest.fn()}
onSelectAlmTab={jest.fn()}
onUpdateDefinitions={jest.fn()}
settingsDefinitions={[]}
{...props}
/>
);

+ 0
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTab-test.tsx Целия файл

@@ -86,7 +86,6 @@ function shallowRender(props: Partial<AlmTab['props']> = {}) {
onCheck={jest.fn()}
onDelete={jest.fn()}
onUpdateDefinitions={jest.fn()}
settingsDefinitions={[]}
{...props}
/>
);

+ 0
- 1
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmTabRenderer-test.tsx Целия файл

@@ -104,7 +104,6 @@ function shallowRender(props: Partial<AlmTabRendererProps> = {}) {
onDelete={jest.fn()}
onEdit={jest.fn()}
afterSubmit={jest.fn()}
settingsDefinitions={[]}
{...props}
/>
);

+ 0
- 1
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 []}
/>
`;

+ 0
- 6
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 []}
/>
</Fragment>
`;
@@ -171,7 +170,6 @@ exports[`should render correctly: bitbucket 1`] = `
onCheck={[MockFunction]}
onDelete={[MockFunction]}
onUpdateDefinitions={[MockFunction]}
settingsDefinitions={Array []}
/>
</Fragment>
`;
@@ -259,7 +257,6 @@ exports[`should render correctly: default 1`] = `
onCheck={[MockFunction]}
onDelete={[MockFunction]}
onUpdateDefinitions={[MockFunction]}
settingsDefinitions={Array []}
/>
</Fragment>
`;
@@ -347,7 +344,6 @@ exports[`should render correctly: delete modal 1`] = `
onCheck={[MockFunction]}
onDelete={[MockFunction]}
onUpdateDefinitions={[MockFunction]}
settingsDefinitions={Array []}
/>
<DeleteModal
id="keyToDelete"
@@ -440,7 +436,6 @@ exports[`should render correctly: gitlab 1`] = `
onCheck={[MockFunction]}
onDelete={[MockFunction]}
onUpdateDefinitions={[MockFunction]}
settingsDefinitions={Array []}
/>
</Fragment>
`;
@@ -528,7 +523,6 @@ exports[`should render correctly: loading 1`] = `
onCheck={[MockFunction]}
onDelete={[MockFunction]}
onUpdateDefinitions={[MockFunction]}
settingsDefinitions={Array []}
/>
</Fragment>
`;

+ 0
- 1
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 []}
/>
`;

+ 20
- 142
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`]
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -101,18 +89,6 @@ exports[`should render correctly for multi-ALM binding: loaded 1`] = `
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -159,18 +135,6 @@ exports[`should render correctly for multi-ALM binding: loading ALM definitions
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -217,18 +181,6 @@ exports[`should render correctly for multi-ALM binding: loading project count 1`
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -275,18 +227,6 @@ exports[`should render correctly for single-ALM binding 1`] = `
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -333,18 +273,6 @@ exports[`should render correctly for single-ALM binding 2`] = `
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -391,18 +319,6 @@ exports[`should render correctly for single-ALM binding 3`] = `
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -439,18 +355,6 @@ exports[`should render correctly with validation: create a first 1`] = `
</div>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -501,18 +405,6 @@ exports[`should render correctly with validation: create a second 1`] = `
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -563,18 +455,6 @@ exports[`should render correctly with validation: default 1`] = `
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -611,18 +491,6 @@ exports[`should render correctly with validation: empty 1`] = `
</div>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="azure"
/>
</div>
</div>
`;

@@ -671,17 +539,27 @@ exports[`should render correctly with validation: pass the correct key for bitbu
/>
</DeferredSpinner>
</div>
<div
className="huge-spacer-top huge-spacer-bottom bordered-top"
/>
<div
className="big-padded"
<Alert
className="spacer"
variant="info"
>
<CategoryDefinitionsList
category="almintegration"
definitions={Array []}
subCategory="bitbucket"
<FormattedMessage
defaultMessage="settings.almintegration.tabs.authentication_moved"
id="settings.almintegration.tabs.authentication-moved"
values={
Object {
"link": <Link
to={
Object {
"pathname": "/admin/settings?category=authentication",
}
}
>
property.category.authentication
</Link>,
}
}
/>
</div>
</Alert>
</div>
`;

+ 10
- 8
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:<ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your GitHub profile, you need to create a Developer Application for which the 'Authorization callback URL' must be set to <code>'&lt;value_of_sonar.core.serverBaseURL_property&gt;/oauth2/callback'</code>.</li></ul>
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: <ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your Bitbucket OAuth Consumer settings, 'Callback URL' must be set to <code>'&lt;value_of_sonar.core.serverBaseURL_property&gt;'</code>.</li></ul>
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:<ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your GitHub profile, you need to create a Developer Application for which the 'Authorization callback URL' must be set to <code>'&lt;value_of_sonar.core.serverBaseURL_property&gt;/oauth2/callback'</code>.</li></ul>
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: <ul><li>SonarQube must be publicly accessible through HTTPS only</li><li>The property 'sonar.core.serverBaseURL' must be set to this public HTTPS URL</li><li>In your Bitbucket OAuth Consumer settings, 'Callback URL' must be set to <code>'&lt;value_of_sonar.core.serverBaseURL_property&gt;'</code>.</li></ul>
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

Loading…
Отказ
Запис