Skip to content

Fix allowing of groups and projects to invite groups for admin

What does this MR do and why?

Re-enables the ability for Administrators to invite groups to a project or group that they do not have direct membership on.

Fixes the bug described in #355939 (closed) where administrators could no longer invite a group to another group OR project unless they were a member of the group they were inviting.

  • revert of the invite group modal changes that happened in !78106 (merged)
  • adds more test coverage of those cases admin vs non admin

This bug was introduced via !78106 (merged) and info can be found starting #355939 (comment 877102990) to how that proves out.

more info: #355939 (comment 877012618)

Screenshots or screen recordings

Inviting to a group

As an Admin

before - group alpha is not available as admin to invite to group codingcats

Screen_Shot_2022-03-17_at_11.01.37_AM

after - group alpha is available as admin to invite to group codingcats

Screen_Shot_2022-03-16_at_1.40.10_PM

As a non Admin(owner of the group else not able to invite to it at all)

no change - group alpha is not available to group codingcats

Screen_Shot_2022-03-17_at_11.05.35_AM

no change - group bravo is available to group codingcats due to guest membership on bravo

Screen_Shot_2022-03-17_at_11.07.18_AM

Inviting to a project

As an Admin

before - group alpha is not available as admin to invite to project codingcats/codingcatproject

Screen_Shot_2022-03-16_at_1.44.27_PM

after - group alpha is available as admin to invite to project codingcats/codingcatproject

Screen_Shot_2022-03-17_at_10.58.32_AM

As a non Admin(maintainer of the project else not able to invite to it at all)

no change - group alpha is not available to project codingcats/codingcatproject

Screen_Shot_2022-03-17_at_11.08.44_AM

no change - group bravo is available to project codingcats/codingcatproject due to guest membership on bravo

Screen_Shot_2022-03-17_at_11.09.13_AM

How to set up and validate locally

  1. run steps as outlined in the description of #355939 (closed)
  2. As a regular (non-Administrator) user, create a project codingcats/codingcatproject. We will invite other groups to this project.
  3. Browse to the codingcats/codingcatproject project > Project information > Members
  4. repeat steps 6-10 from the steps in the description of #355939 (closed) for the codingcats/codingcatproject project

MR acceptance checklist

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

Related to #355939 (closed)

Edited by Doug Stull

Merge request reports