Wrong message when adding user to project while pending request already exists

Summary

There is a project (P) owned by a group (G). User (U) has a pending membership request in G. I want to add U to P. Message: Users were successfully added. However nothing really happens. You cannot add U to P as it has already access through G, just pending.

Steps to reproduce

  1. Create a Group
  2. Add a Project to Group
  3. Add a new user and request membership to Group. Do not grant the request.
  4. Try to add the User to the Project.

Example Project

What is the current bug behavior?

You get a success message: Users were successfully added

What is the expected correct behavior?

You should get a Warning: User has a pending request already