Skip to content

Enable integration API for admin integrations custom ability

Jarka Košanová requested to merge 460522-integrations-api into master

What does this MR do and why?

It adds permissions to use Integrations API to a user who is assigned admin_integrations custom permission.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Create a custom role that enables admin integrations custom permission, on admin - roles and permissions page if you are on self-managed, http://gdk.test:3000/admin/application_settings/roles_and_permissions/
  2. Assign this permission to a member who is not an owner
  3. Log in as the user with that custom permission
  4. Get API access token
  5. Use that API token for running following API requests:
curl --header "Authorization: Bearer TOKEN" "http://gdk.test:3000/api/v4/projects/7/integrations"
curl --header "Authorization: Bearer TOKEN" --request PUT --header "Content-Type: application/json" \
--data '{"api_key":"soome-key"}' "http://gdk.test:3000/api/v4/projects/7/integrations/asana"
curl --header "Authorization: Bearer TOKEN" --request DELETE "http://gdk.test:3000/api/v4/projects/7/integrations/asana"
curl --header "Authorization: Bearer TOKEN" "http://gdk.test:3000/api/v4/projects/7/integrations/asana"

Related to #460522 (closed)

Edited by Jarka Košanová

Merge request reports

Loading