Refactor audit events for Users services
requested to merge 374107-add-event-type-information-for-audit-events-using-auditeventservice-in-user into master
What does this MR do and why?
Adds audit event types for User services. Refactors associated API helpers to use Gitlab::Audit::Auditor
to build audit events.
This affects the following services:
- ee/app/services/ee/users/create_service.rb
- ee/app/services/ee/users/destroy_service.rb
- ee/app/services/ee/users/approve_service.rb
- ee/app/services/ee/users/reject_service.rb
- ee/app/services/ee/users/block_service.rb
Verification
These services can be triggered through actions in Admin > Overview > Users:
- Create a user using the "New User" button.
- Delete a user (this may take a while to process).
- Block a user.
The above should each generate an audit event. To trigger approve/reject events, register a new user in the login page, then accept or reject that user through the admin role.
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 #374107 (closed)
Edited by Aaron Huntsman