[Frontend] Update audit events filter bar to search by username
What does this MR do and why?
This updates the audit events filter bar to search by username instead of user ID to resolve #335016 (closed).
This is part 2 containing the frontend changes, the backend MR is !73741 (merged).
The following changes were made:
- Update the utility methods to parse the username from and to the URL query.
- Move logic for handling primary identifier from the shared audit token to individual tokens (group, project, member & user).
- Update the audit filter to search by both
entity_id
for groups & projects, andusername
for users & members. - Refactors shared audit event token specs.
- Add unit tests for the each audit token type.
Screenshots or screen recordings
Token in action
Before | After |
---|---|
Instance audit events
Group audit events
Project audit events
How to set up and validate locally
- You need a GitLab Premium license.
- View the different level of audit events using the above links.
- Try filtering by a user / member and validate the results.
- To create audit events, add users to a group/project or create a new group/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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #335016 (closed)
Edited by Jiaan Louw