Skip to content

Add individual member approval API endpoint

Vijay Hawoldar requested to merge vij-individual-member-approve-api into master

What does this MR do and why?

Adds a new REST API endpoint for approving pending members (users who are added to a group which has hit it's user cap).

The user cap feature is behind a feature flag that is currently disabled as it's in development, so this endpoint will not be used and will not do anything for existing members (because they'll never be an awaiting state right now).

Eventually, the front-end will hit this endpoint for a user who is in the pending state, from the group member management screen.

How to set up and validate locally

  1. Make a member pending/awaiting
    Member.last.wait!
    Member.last.awaiting?
    => true
  2. Hit the API endpoint for that member's group/user
    curl --request PUT \
    --url http://127.0.0.1:3000/api/v4/groups/:group_id/members/:user_id/approve \
    --header 'PRIVATE-TOKEN: <your token>' \
  3. Verify the change
    Member.last.active?
    => true

MR acceptance checklist

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

Relates to #332596 (closed)

Edited by Corinna Gogolok

Merge request reports