Show indicator for projects created and owned by banned users
What does this MR do and why?
Partially resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/work_items/397
Display hidden resource icon instead of visibility level icon for projects created and owned by banned users. Since these projects are hidden, the indicator will only show for admin users.
Screenshots or screen recordings
Page | Before | After |
---|---|---|
Project show page | ![]() |
![]() |
Projects list page | ![]() |
![]() |
Group settings projects page | ![]() |
![]() |
Admin project page | ![]() |
![]() |
How to set up and validate locally
Note: In the URLs below, replace (username)
with the username of the user in (2), (project-slug)
with the project slug created in (3), and group-slug
with the group slug created in (4)
- Enable the feature flag
$ rails c > Feature.enable(:hide_projects_of_banned_users) => true
- Create a non-admin user or use an existing one
- Create a personal public project (under the user namespace not a group)
- Create a public group then create a public project under that group
- Login with an admin account (
root
) - Go to http://localhost:3000/admin/users/(username). Ban the user.
- Go to http://localhost:3000/ and search for your project. Validate that the correct icon with a tooltip is displayed (see screenshots above).
- Go to the project page: http://localhost:3000/(username)/(project-slug). Validate that the correct icon with a tooltip is displayed (see screenshots above).
- Go to the admin project page: http://localhost:3000/admin/projects/(username)/(project-slug). Validate that the correct icon with a tooltip is displayed (see screenshots above).
- Go to the group settings projects page for the project created in (4): http://localhost:3000/groups/(group-slug)/-/projects. Validate that the correct icon with a tooltip is displayed (see screenshots above).
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.
Edited by Eugie Limpin