generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DMP-4381: Automatically update createdBy and lastModifiedBy when persisting entities to the database #2308
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ben-Edwards-cgi
requested review from
davet1985,
jackmaloney,
hemantasharma1129,
narinder17,
Johns293 and
nman-hmcts
and removed request for
a team
November 22, 2024 14:03
hmcts-jenkins-cnp
bot
added
ns:darts-modernisation
prd:darts
rel:darts-api-pr-2308
labels
Nov 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this PR should also include removal of any code that explicitly sets the createdBy
and lastModifiedBy
values in our various services/components, such that this new mechanism gets used?
src/main/java/uk/gov/hmcts/darts/authentication/config/AuthenticationConfiguration.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/darts/common/entity/base/CreatedBaseEntity.java
Outdated
Show resolved
Hide resolved
jackmaloney
reviewed
Nov 26, 2024
src/main/java/uk/gov/hmcts/darts/audio/helper/TransformedMediaHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/darts/common/repository/TransformedMediaRepository.java
Outdated
Show resolved
Hide resolved
src/test/java/uk/gov/hmcts/darts/audio/service/impl/AudioTransformationServiceImplTest.java
Outdated
Show resolved
Hide resolved
...egrationTest/java/uk/gov/hmcts/darts/common/service/TransientObjectDirectoryServiceTest.java
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/darts/audio/helper/TransformedMediaHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/darts/audio/helper/TransformedMediaHelper.java
Outdated
Show resolved
Hide resolved
chrisbellingham-hmcts
approved these changes
Dec 10, 2024
src/main/java/uk/gov/hmcts/darts/common/entity/listener/UserAuditListener.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/darts/common/entity/listener/UserAuditListener.java
Outdated
Show resolved
Hide resolved
jackmaloney
reviewed
Jan 17, 2025
...ionTest/java/uk/gov/hmcts/darts/arm/service/AbstractArmBatchProcessResponseFilesIntTest.java
Show resolved
Hide resolved
chrisbellingham-hmcts
approved these changes
Jan 17, 2025
src/main/java/uk/gov/hmcts/darts/common/entity/listener/UserAuditListener.java
Show resolved
Hide resolved
jackmaloney
reviewed
Jan 17, 2025
src/main/java/uk/gov/hmcts/darts/common/entity/base/CreatedBaseEntity.java
Outdated
Show resolved
Hide resolved
jackmaloney
approved these changes
Jan 17, 2025
jackmaloney
pushed a commit
that referenced
this pull request
Jan 20, 2025
…isting entities to the database (#2308)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Links
Change description
Git Diff Summary
This Git Diff introduces enhancements to the authentication and entity management components of the application. Key changes include the addition of auditing capabilities for tracking user account interactions in the
AuthenticationConfiguration
,CreatedBaseEntity
, andCreatedModifiedBaseEntity
classes.Highlights
AuthenticationConfiguration Updates:
AuditorAware<UserAccountEntity>
bean to provide information about the currently authenticated user.Entity Changes:
CreatedBaseEntity
, added@CreatedBy
annotation to thecreatedBy
field to track the user who created the entity.CreatedModifiedBaseEntity
, added@LastModifiedBy
annotation to thelastModifiedBy
field to track the user who last modified the entity.These modifications enhance the tracking of user interactions with entities, improving the auditing capability of the application.
Does this PR introduce a breaking change? (check one with "x")