Serve integrations pages in organization admin area

What does this MR do and why?

Adds integration defaults pages to the organization admin area, so an organization owner can open and save integration defaults at /o/:organization_path/admin/settings/integrations.

  • Adds Admin::Organizations::IntegrationsController and routes for list, edit, update, overrides, test and reset.
  • Access needs the update_integration permission on the organization (added in !259072 (merged)), on top of the existing org admin area checks.
  • The pages don't use the !Gitlab.com? gate, so they work on GitLab.com. The instance admin pages at /admin/application_settings/integrations keep that gate and are unchanged.
  • Moves the shared overrides action into Admin::IntegrationsActions, used by both controllers.
  • Adds an organization: option to the scoped_* integration path helpers, so forms, redirects and tabs link to the org pages.
  • Adds a Settings > Integrations item to the org admin sidebar.
  • Mounts the existing integrations Vue apps on the new pages. Page copy is a placeholder until the design in #631297 (closed) lands.

Part of gitlab-org#22859 Closes #631291 (closed)

I'm adding pipeline:skip-router-sync as there is an MR raised in the http-router repo that has been raised and in review. I don't want to prevent this MR from merging because the other MR has not been approved.

How to set up and validate locally

  1. In a Rails console, make sure the org admin area is enabled and create an organization integration:
    Feature.enable(:org_stage_la_100)
    org = Organizations::Organization.find_by(path: '<your-org-path>')
    integration = Integration.find_or_initialize_non_project_specific_integration(
      'jira', instance: true, organization_id: org.id
    )
    integration.update!(active: true, url: 'https://jira.example.com', username: 'user', password: 'secret')
  2. Restart the gdk, gdk restart, then sign in as root and enable admin mode (or sign in as an organization owner).

New organization pages

Replace <org> with your organization path.

Page URL Check
List /o/<org>/admin/settings/integrations Jira shows as configured, and the sidebar item Settings > Integrations is highlighted.
Edit /o/<org>/admin/settings/integrations/jira/edit Saving redirects back to this page with a success notice. An invalid URL re-renders the form with errors. Cancel goes to the list.
Overrides /o/<org>/admin/settings/integrations/jira/overrides The "Projects using custom settings" tab loads. Both tabs link to org URLs.

Also check that:

  • A user who is not an org owner or instance admin gets a 404.
  • Another organization's path doesn't show this organization's integrations.

Pages that share the changed helpers and views (should be unchanged)

  • Instance admin: /admin/application_settings/integrations. Open the list, edit and save, and open the overrides tab.
  • Project: Settings > Integrations. Open the list, edit and save.
  • Group: Settings > Integrations. Open the list, edit and save.

Screenshots or screen recordings

settings-integrations

setting-integration-edit

overrides

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #631219

Edited by Carla Drago

Merge request reports

Loading
Loading