Skip to content

Add member_role_id to LDAP group links REST API

Hinam Mehra requested to merge 435229-ldap-sync-custom-roles-rest-api into master

What does this MR do and why?

  • Follows up from !155680 (merged)
  • Allows LDAP group link to be created with member_role_id using the REST API

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.

How to set up and validate locally

  1. Log-in as an admin and get a personal access token

  2. Create a member role using the rails console. Note down the ID of the member role.

MemberRole.create(base_access_level: 10, read_code: true)
  1. Create an LDAP group link
POST /api/v4/groups/<GROUP_ID>/ldap_group_links

{
  "group_access": 10, 
  "member_role_id": <MEMBER_ROLE_ID>, 
  "cn": "example", 
  "provider": "LDAP"
}
  1. Get LDAP group links for a group
GET /api/v4/groups/<GROUP_ID>/ldap_group_links

Related to #435229

Edited by Hinam Mehra

Merge request reports