Exclude creation event from audit changes
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
-
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
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