Show access levels for Maintainer vs Owner for Project invite modals
What does this MR do and why?
For access requests and invitations, show a modal that reflects the allowed access levels for that user.
- For project maintainers, show Minimal Access, Guest, Reporter, Developer, Maintainer.
- For project owners, show Owner in addition.
'Owner access' means direct owners OR inherited owners (in the case of personal projects, the owner of the personal namespaces, or in the case of a group, owners of any of the project's parent groups). It also includes admins.
Screenshots or screen recordings
Before
As Owner
Invite member | Invite group |
---|---|
As Maintainer
Invite member | Invite group |
---|---|
After
As Owner
Invite member | Invite group |
---|---|
As Maintainer
Invite member | Invite group |
---|---|
How to set up and validate locally
** note: this works for both inherited and direct access. So an Owner of a group can also add Owners to the group's Projects.
As a Project owner
- Visit the members section of the project
- Click 'Invite a group'
- Click 'Select a role' dropdown
- Verify that the options include
Owner
- Close modal
- Click 'Invite members'
- Click 'Select a role' dropdown
- Verify that the options include
Owner
As a Project maintainer
- Visit the members section of the project
- Click 'Invite a group'
- Click 'Select a role' dropdown
- Verify that the options do not include
Owner
- Close modal
- Click 'Invite members'
- Click 'Select a role' dropdown
- Verify that the options do not include
Owner
As a Group owner
Regardless, the dropdown should show "Owner"
As a Group maintainer
Group maintainers cannot manage members, so the Invite modal does not appear at all.
As an admin
Regardless, the dropdown should show "Owner"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Sort of Related to #21432 (closed)