Display group metadata in CICD admin pages
What does this MR do and why?
Introduce read_group_metadata ability to grant users minimal read access to a group's information.
This ability can be granted to users to allow them to see minimal information about a group (e.g. name, avatar) even without membership to the group (membership grants read_group ability).
read_group_metadata is currently enabled for a user when any of the following conditions are met:
- user can
read_group - user can
read_admin_cicd- purpose: so the user can see minimal information for groups (the user is not a member of) associated with group runners
References
Adjust views so that only allowed components an... (#525077 - closed)
Screenshots or screen recordings
How to set up and validate locally
- Enable feature flag
$ rails c > Feature.enable(:custom_admin_roles) - Create a new admin member role with
read_admin_cicdpermission enabled> admin_member_role = MemberRole.create(name: 'Test', description: 'Test', read_admin_cicd: true) - Assign the new admin role to a non-admin user
> user = User.find(<a_user_id>) > Users::UserMemberRole.create(member_role: admin_member_role, user: user)` - Login with the user
- Click global search in left sidebar ("Search or go to"). Click "Admin area" menu item.
- In
/admin/runnerspage, click onGroupstab to see group runners - Verify that runners assigned to a group the user is not a member of displays the group's name as plain text instead of a link
- Visit a runner assigned to a group the user is not a member
- Verify that the names and avatars of assigned groups the user the user is not a member of are displayed as plain text instead of a link
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Eugie Limpin

