Skip to content

Exclude creation event from audit changes

Tan Le requested to merge 201722-exlude-creation-from-audit-changes into master

What does this MR do?

This MR addresses a bug that causes audit changes event incorrectly recorded on creation instead of just only update.

This bug was picked up when I am trying to add new audit event for ApprovalProjectRule. Both the ApprovalRules::UpdateService and ApprovalRules::CreateService share similar update logic and Audit::Changes is only capable to records changes but not creation.

This will partially address #201722 (closed) as it stops audit changes events being recorded when ghost user is created.

Extracted from !25583 (closed) to reduce scope.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tan Le

Merge request reports