Auto-Remediation - Bot profile - Frontend
- Related issue: #215684 (closed)
What does this MR do?
This makes a few visual changes to make bot users (and specifically GitLab Security Bot
) stand out from other users.
- A bot's user profile should only expose an Overview and an Activity tab. In the Overview tab, the projects panel is removed, and the Activity panel's title is changed from Activity to Bot activity. The user's website is considered as a help link, so we add a
?
icon next to it. - In the user popover, there should be a link to the bot's documentation. Note that this change only applies to the
GitLab Security Bot
due to some API restrictions. - In the admin area's users list, there should be a link to the bot's documentation next to its name.
How to test this?
- Enable the
:security_auto_fix
feature flag.
echo "Feature.enable(:security_auto_fix)" | rails c
- Create the
GitLab Security Bot
.
echo "User.security_bot" | rails c
- Create a merge request and assign it to the
GitLab Security Bot
from Rails' console (required to test the popover).
mr = MergeRequest.find(<mr_id>)
mr.author = User.security_bot
mr.save
- Visit the bot's profile at
/security-bot
or/GitLab-Security-Bot
. - Visit the users list in the admin area at
/admin/users
. - Visit the previously created merge request and hover over the author's name.
Screenshots
User profile
Before | After |
---|---|
User popover
Before | After |
---|---|
Note: popovers have a max width of 384px, hence the odd line break in the "more info" link
Users admin
Before | After |
---|---|
Note: Internal users don't seem to appear in projects' users lists, so this change only affects the admin area
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Jannik Lehmann