Skip to content

Smriti/370090 create api manage customizable roles

What does this MR do and why?

#370090 (closed)

Created GET POST and DELETE endpoints for member_roles

Screenshots or screen recordings

GET Request

Screenshot_2022-09-05_at_12.05.54_PM

POST Request

Screenshot_2022-09-05_at_12.06.06_PM

Screenshot_2022-09-05_at_12.06.18_PM

DELETE Request

Screenshot_2022-09-05_at_12.06.48_PM

How to set up and validate locally

  1. Enable the feature flag

    gdk rails console
    
    Feature.enable('api_customizable_roles')
  2. Use curl requests to verify the APIs

    curl --location --request GET 'https://gdk.test:3443/api/v4/groups/22/member_roles/' \
    --header 'PRIVATE-TOKEN:< Valid Private Token for Admin role>' \
    --form 'base_access_level="20"' \
    --form 'download_code="0"'
    
    
    curl --location --request POST 'https://gdk.test:3443/api/v4/groups/22/member_roles/' \
    --header 'PRIVATE-TOKEN:< Valid Private Token for Admin role>' \
    --form 'base_access_level="30"' \
    --form 'download_code="1"'
    
    
    curl --location --request DELETE 'https://gdk.test:3443/api/v4/groups/22/member_roles/1' \
    --header 'PRIVATE-TOKEN:< Valid Private Token for Admin role>'

-->

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Smriti Garg

Merge request reports