Skip to content

Add member approve_all API endpoint

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

What does this MR do and why?

Adds a new REST API endpoint for approving all 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).

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 POST \
    --url http://127.0.0.1:3000/api/v4/groups/:group_id/members/approve_all \
    --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