Group shared with project has higher permission options than should be available

Summary

Group shared with project has higher permission options than should be available

Steps to reproduce

  1. Create a group (name: top-level)
  2. Create another group (name: group-with-members)
  3. Create a project in top-level (name: some-project)
  4. Add group-with-members to some-project as Developer
  5. Try to change group-with-members permissions inside some-project to `Owner``
  6. Notice the 422 in the browser console

Example Project

https://gitlab.com/top-level-test-group/test-project/-/project_members

Feel free to try it out ourself and play around with my example

What is the current bug behavior?

The Owner option appears inside the project

What is the expected correct behavior?

The Owner option should not appear inside the project

Relevant logs and/or screenshots

<image

Output of checks

This bug happens on GitLab.com

Possible fixes

Don't show the Owner option in the project share section