Skip to content

Change API endpoint used when inviting a group to a project

What does this MR do and why?

Related to #391591 (closed)

This MR switches the API endpoint used when inviting a group to a project. We are now using the GET /projects/:id/share_locations API endpoint.

Before this MR, when inviting a group to a project sometimes groups that were not allowed to be invited would be shown. When you tried to invite them you would just get an error message that said Not found (see below screenshot). Now they are not shown in the dropdown at all.

Screenshots or screen recordings

Before After
Screenshot_2023-05-02_at_3.18.08_PM Screenshot_2023-05-02_at_3.20.11_PM

How to set up and validate locally

  1. Create a private group
  2. In that private group, create a project
  3. Navigate to /admin/users and choose a user
  4. Navigate to the project from step 2 -> Manage -> Members
  5. Invite the user from step 3
  6. Navigate to the user you just invited in /admin/users and click Impersonate
  7. Click New project in upper right corner
  8. Create a project in you namespace (should be the default)
  9. In that new project navigate to Manage -> Members
  10. Click Invite a group
  11. The private group you created in step 1 should not be listed as an option

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 Peter Hegman

Merge request reports

Loading