Replacing invalid audit event entity in project deletion with valid one
What does this MR do and why?
project_deleted
audit event was introduced in MR !117546 (merged), it used audit event scope as UserNamespace
in case the project owner is a UserNamespace which is an invalid scope type for audit events. Replacing it with the UserNamespace owner which will be of type User
a valid scope type.
How to set up and validate locally
- For testing this you would be required to have access to a GitLab instance with Ultimate license and instance admin access.
- Create a project under user namespace.
- Now delete the project created in step 2.
- Visit http://gitlab.localdev:3000/admin/audit_logs?tab=log for checking instance level audit events. You would observe that the link in
Object
section will point to the user to whose namespace the project used to belong and the text will be that user's username. - Now create a project under any group.
- Then delete the project created in step 5.
- Visit http://gitlab.localdev:3000/admin/audit_logs?tab=log and refresh for checking instance level audit events. You would observe that the link in
Object
section will point to the group to which project used to belong and the text will be that group's name.
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 #415538 (closed)
Edited by Hitesh Raghuvanshi