Enable integration API for admin integrations custom ability
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
- 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/
- Assign this permission to a member who is not an owner
- Log in as the user with that custom permission
- Get API access token
- 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á