-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature: User Audit Log #310
Conversation
Co-authored-by: iammajid <[email protected]>
Co-authored-by: iammajid <[email protected]>
Co-authored-by: iammajid <[email protected]>
WalkthroughThis pull request expands the audit logging functionality by introducing three new user account event types: Possibly related PRs
Suggested reviewers
Tip 🌐 Web search-backed reviews and chat
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 4
♻️ Duplicate comments (1)
frontend/src/components/AuditLogDetailsUserAccountSetupComplete.vue (1)
32-36
: 🛠️ Refactor suggestionHandle potential errors in authority resolution.
Similar to AuditLogDetailsUserAccountReset.vue, the
onMounted
hook should handle potential errors when fetching authority details.
🧹 Nitpick comments (6)
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountResetEvent.java (2)
15-18
: Add field constraints and validation.Consider enhancing the
resetBy
field with additional constraints:
- Add nullability constraint
- Add size limits
- Consider input validation for security
@Column(name = "reset_by") +@NotNull +@Size(min = 1, max = 255) +@Pattern(regexp = "^[a-zA-Z0-9@._-]+$") // adjust pattern based on your username requirements private String resetBy;
20-26
: Consider adding validation in setter.The setter method could benefit from parameter validation to ensure data integrity.
public void setResetBy(String resetBy) { + Objects.requireNonNull(resetBy, "resetBy must not be null"); + if (resetBy.trim().isEmpty()) { + throw new IllegalArgumentException("resetBy must not be empty"); + } this.resetBy = resetBy; }backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java (3)
15-15
: Add Javadoc for the TYPE constant.Consider adding Javadoc to document the purpose and usage of this constant, especially since it's public and used in the @DiscriminatorValue annotation.
+ /** + * Discriminator value for user account setup completion events. + * Used to identify this event type in the audit log. + */ public static final String TYPE = "USER_ACCOUNT_SETUP_COMPLETE";
17-18
: Add nullability constraint to the completedBy field.Consider adding a nullability constraint to explicitly define whether this field can be null. This helps maintain data integrity and makes the contract clearer.
- @Column(name = "completed_by") + @Column(name = "completed_by", nullable = false) private String completedBy;
29-34
: Add self-comparison check to equals method.The equals method should first check if the object being compared is the same instance (self-comparison) for better performance.
@Override public boolean equals(Object o) { + if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; UserAccountSetupCompleteEvent that = (UserAccountSetupCompleteEvent) o; return Objects.equals(completedBy, that.completedBy); }
frontend/src/components/AuditLogDetailsUserAccountReset.vue (1)
12-13
: Consider handling loading and error states.The component should handle loading and error states when fetching authority details to improve user experience.
- <span v-if="resolvedResetBy != null">{{ resolvedResetBy.name }}</span> - <code class="text-xs" :class="{'text-gray-600': resolvedResetBy != null}">{{ event.resetBy }}</code> + <template v-if="loading"> + <span class="text-gray-500">Loading...</span> + </template> + <template v-else-if="error"> + <span class="text-red-500">Failed to load authority details</span> + <code class="text-xs">{{ event.resetBy }}</code> + </template> + <template v-else> + <span v-if="resolvedResetBy != null">{{ resolvedResetBy.name }}</span> + <code class="text-xs" :class="{'text-gray-600': resolvedResetBy != null}">{{ event.resetBy }}</code> + </template>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java
(4 hunks)backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
(2 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java
(1 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountResetEvent.java
(1 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java
(1 hunks)backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Audit_Event_User_Account_Setup_Or_Reset.sql
(1 hunks)frontend/src/common/auditlog.ts
(2 hunks)frontend/src/components/AuditLog.vue
(2 hunks)frontend/src/components/AuditLogDetailsUserAccountReset.vue
(1 hunks)frontend/src/components/AuditLogDetailsUserAccountSetupComplete.vue
(1 hunks)frontend/src/i18n/de-DE.json
(2 hunks)frontend/src/i18n/en-US.json
(2 hunks)
🔇 Additional comments (19)
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountResetEvent.java (1)
1-13
: LGTM! Well-structured entity class definition.The JPA annotations and inheritance setup are correctly implemented, following best practices for entity mapping and audit event hierarchy.
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java (1)
10-13
: LGTM! Well-structured entity class.The class is properly annotated with JPA annotations and follows the established naming conventions for audit event entities.
frontend/src/components/AuditLogDetailsUserAccountSetupComplete.vue (1)
12-13
: Consider handling loading and error states.Similar to AuditLogDetailsUserAccountReset.vue, this component should handle loading and error states when fetching authority details.
backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java (1)
56-61
: LGTM! The new event logging methods follow consistent patterns.The implementation maintains consistency with other event logging methods in the class and properly handles event persistence.
Also applies to: 63-68
frontend/src/common/auditlog.ts (2)
39-47
: LGTM! The new DTOs follow consistent patterns.The new DTOs maintain consistency with existing DTOs and properly extend the base DTO type.
109-109
: LGTM! Union type correctly updated.The AuditEventDto union type has been properly updated to include the new event types.
backend/src/main/java/org/cryptomator/hub/api/UsersResource.java (2)
86-86
: LGTM! Well-placed audit logging for account setup.The logging statement is correctly placed after all user data is set but before persistence, ensuring accurate tracking of the setup completion event.
172-172
: LGTM! Well-placed audit logging for account reset.The logging statement is correctly placed after user data is cleared but before device/token deletion, ensuring accurate tracking of the reset event.
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java (4)
22-23
: LGTM! Proper import organization.The new event class imports are correctly added and organized with related imports.
89-90
: LGTM! Proper JSON type configuration.The new event types are correctly registered in the JsonSubTypes configuration, following the established pattern.
114-115
: LGTM! Consistent event handling.The new cases in the switch statement follow the established pattern and correctly map to their respective DTOs.
144-148
: LGTM! Well-structured DTOs.The new DTOs follow the established record pattern with proper JSON property annotations.
frontend/src/components/AuditLog.vue (2)
108-109
: LGTM! Proper event type handling in template.The new event types are correctly handled with v-else-if conditions, following the established pattern.
177-178
: LGTM! Well-organized component imports.The new component imports are correctly added and organized with related imports.
backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Audit_Event_User_Account_Setup_Or_Reset.sql (2)
1-7
: LGTM! Well-structured setup event table.The table definition follows best practices:
- Primary key constraint properly defined
- Foreign key with cascade delete ensures referential integrity
- Appropriate column types and NOT NULL constraints
9-15
: LGTM! Well-structured reset event table.The table definition follows best practices and maintains consistency with the setup event table:
- Consistent naming conventions
- Similar structure and constraints
- Proper foreign key relationship
frontend/src/i18n/en-US.json (2)
84-85
: New Audit Log Event Entries Added.
The entries"auditLog.details.user.account.reset": "Reset User Account"
and"auditLog.details.user.account.setup.complete": "Complete Account Setup"
have been added correctly to support the new user account events as described in the PR objectives. Please ensure that the backend and frontend components reference these keys consistently.
94-94
: Repositioning of Existing Audit Detail.
The"auditLog.details.wot.signedIdentity": "Signed Identity"
entry has been moved to a different location in the JSON file. Verify that any components using this key are updated if necessary and that the change in ordering does not cause lookup issues.frontend/src/i18n/de-DE.json (1)
84-85
: New German Audit Log Event Entries Added.
The new entries"auditLog.details.user.account.reset": "Account zurückgesetzt"
and"auditLog.details.user.account.setup.complete": "Account eingerichtet"
are correctly added with appropriate German translations. Please double-check that these keys align with the corresponding backend event types.
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountResetEvent.java
Show resolved
Hide resolved
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java
Outdated
Show resolved
Hide resolved
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.
LGTM, only one minor change in the German translation
Update German strings to use consistent verb forms Co-authored-by: Julian Raufelder <[email protected]>
This is useful in the event that the user changes their username or the user is deleted.
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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Audit_Event_User_Account_Setup_Or_Reset.sql (1)
1-8
: SQL Table Creation: audit_event_user_account_setup_complete – Consistency in Column DefinitionsThe table definition is correct, with a clear primary key and foreign key constraint ensuring referential integrity with the
audit_event
table. One minor note: thecompleted_by
column is defined asVARCHAR(255) COLLATE "C"
, while theuser_name
column is simply defined asVARCHAR NOT NULL
. For consistency and to avoid potential issues with data length or collation differences, consider explicitly defining the length and collation (e.g.,VARCHAR(255) COLLATE "C"
) foruser_name
as well.Diff Suggestion:
- "user_name" VARCHAR NOT NULL, + "user_name" VARCHAR(255) COLLATE "C" NOT NULL,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java
(4 hunks)backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
(2 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java
(1 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java
(1 hunks)backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Audit_Event_User_Account_Setup_Or_Reset.sql
(1 hunks)frontend/src/common/auditlog.ts
(2 hunks)frontend/src/components/AuditLogDetailsUserAccountSetupComplete.vue
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- frontend/src/components/AuditLogDetailsUserAccountSetupComplete.vue
- backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build and Test
🔇 Additional comments (4)
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java (1)
27-29
: Add input validation to setCompletedBy method.Since this is an audit event, it's crucial to ensure data integrity. Consider adding validation to prevent null or empty values.
public void setCompletedBy(String completedBy) { + if (completedBy == null || completedBy.trim().isEmpty()) { + throw new IllegalArgumentException("completedBy must not be null or empty"); + } this.completedBy = completedBy; }backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java (1)
56-69
: LGTM! The new logging methods are well-implemented.The implementation follows the established pattern and correctly handles event creation, timestamp setting, and persistence.
frontend/src/common/auditlog.ts (1)
39-48
: LGTM! The new DTOs are well-structured.The implementation follows the established pattern and correctly defines the required fields for the new event types.
Also applies to: 110-110
backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Audit_Event_User_Account_Setup_Or_Reset.sql (1)
10-16
: SQL Table Creation: audit_event_user_account_reset – Correct and ConsistentThis table is defined correctly with an appropriate primary key and a foreign key constraint referencing the
audit_event
table. The use ofVARCHAR(255) COLLATE "C"
for thereset_by
column is consistent with other similar columns in the system. No changes are required here.
backend/src/main/java/org/cryptomator/hub/entities/events/UserAccountSetupCompleteEvent.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java
Outdated
Show resolved
Hide resolved
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java (1)
144-148
: Consider adding field validation.While the DTOs are well-structured, consider adding validation to ensure required fields (resetBy, completedBy, userName) are not null or empty.
record UserAccountResetEventDto(long id, Instant timestamp, String type, - @JsonProperty("resetBy") String resetBy + @JsonProperty("resetBy") @jakarta.validation.constraints.NotBlank String resetBy ) implements AuditEventDto { } record UserAccountSetupCompleteEventDto(long id, Instant timestamp, String type, - @JsonProperty("completedBy") String completedBy, - @JsonProperty("userName") String userName + @JsonProperty("completedBy") @jakarta.validation.constraints.NotBlank String completedBy, + @JsonProperty("userName") @jakarta.validation.constraints.NotBlank String userName ) implements AuditEventDto { }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build and Test
🔇 Additional comments (4)
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java (4)
22-23
: LGTM!The new imports for user account events are correctly placed and follow the existing package structure.
87-90
: LGTM!The JsonSubTypes configuration correctly maps the event types to their corresponding DTOs, following the fix from the previous review.
113-115
: LGTM!The new cases in the fromEntity method correctly map the event fields to their corresponding DTOs, maintaining consistency with the existing pattern.
136-142
: LGTM!The reformatting of existing DTOs improves readability while maintaining functionality.
@iammajid please do not merge until @overheadhunter has approved that the following changes in particular 132a98b, b5039d0 and fd9357d are legitimate. |
backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
Outdated
Show resolved
Hide resolved
Co-authored-by: iammajid <[email protected]>
Co-authored-by: iammajid <[email protected]>
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.
Actionable comments posted: 1
🧹 Nitpick comments (7)
frontend/src/components/AuditLogUserSetupCodeChanged.vue (1)
34-36
: Add error handling for authority resolution.The async call to
getAuthority
should include error handling to gracefully handle failures.onMounted(async () => { - resolvedChangedBy.value = await auditlog.entityCache.getAuthority(props.event.changedBy); + try { + resolvedChangedBy.value = await auditlog.entityCache.getAuthority(props.event.changedBy); + } catch (error) { + console.error('Failed to resolve authority:', error); + // Optionally show a user-friendly error message + } });frontend/src/components/AuditLogUserKeysChange.vue (2)
42-44
: Add error handling for authority resolution.The async call to
getAuthority
should include error handling to gracefully handle failures.onMounted(async () => { - resolvedChangedBy.value = await auditlog.entityCache.getAuthority(props.event.changedBy); + try { + resolvedChangedBy.value = await auditlog.entityCache.getAuthority(props.event.changedBy); + } catch (error) { + console.error('Failed to resolve authority:', error); + // Optionally show a user-friendly error message + } });
1-45
: Consider extracting common authority resolution logic.This component shares significant code duplication with
AuditLogUserSetupCodeChanged.vue
. Consider extracting the authority resolution logic into a composable function.Create a new file
useAuthorityResolution.ts
:import { ref, onMounted } from 'vue'; import auditlog from '../common/auditlog'; import { AuthorityDto } from '../common/backend'; export function useAuthorityResolution(authorityId: string) { const resolvedAuthority = ref<AuthorityDto>(); onMounted(async () => { try { resolvedAuthority.value = await auditlog.entityCache.getAuthority(authorityId); } catch (error) { console.error('Failed to resolve authority:', error); } }); return { resolvedAuthority }; }Then use it in both components:
-const resolvedChangedBy = ref<AuthorityDto>(); - -onMounted(async () => { - resolvedChangedBy.value = await auditlog.entityCache.getAuthority(props.event.changedBy); -}); +const { resolvedAuthority: resolvedChangedBy } = useAuthorityResolution(props.event.changedBy);backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java (1)
71-71
: Fix method name capitalization.The method name
logUsersetupCodeChanged
has inconsistent capitalization. The word "setup" should be capitalized to match the naming convention used in the codebase.- public void logUsersetupCodeChanged(String changedBy) { + public void logUserSetupCodeChanged(String changedBy) {frontend/src/common/auditlog.ts (1)
46-46
: Remove unnecessary trailing comma.The property
changedBy
has an unnecessary trailing comma.- changedBy: string, + changedBy: stringfrontend/src/components/AuditLog.vue (1)
108-110
: Maintain consistent component naming.The new component names have inconsistencies in their naming patterns:
AuditLogDetailsUserAccountReset
follows the patternAuditLogUserKeysChange
is missing the "Details" prefixAuditLogUserSetupCodeChanged
is missing the "Details" prefix and uses past tenseRename the components to follow the established pattern:
-import AuditLogUserKeysChange from './AuditLogUserKeysChange.vue'; -import AuditLogUserSetupCodeChanged from './AuditLogUserSetupCodeChanged.vue'; +import AuditLogDetailsUserKeysChange from './AuditLogDetailsUserKeysChange.vue'; +import AuditLogDetailsUserSetupCodeChange from './AuditLogDetailsUserSetupCodeChange.vue';And update the template accordingly:
-<AuditLogUserKeysChange v-else-if="auditEvent.type == 'USER_KEYS_CHANGE'" :event="auditEvent" /> -<AuditLogUserSetupCodeChanged v-else-if="auditEvent.type == 'USER_SETUP_CODE_CHANGE'" :event="auditEvent" /> +<AuditLogDetailsUserKeysChange v-else-if="auditEvent.type == 'USER_KEYS_CHANGE'" :event="auditEvent" /> +<AuditLogDetailsUserSetupCodeChange v-else-if="auditEvent.type == 'USER_SETUP_CODE_CHANGE'" :event="auditEvent" />Also applies to: 178-179, 187-188
frontend/src/i18n/de-DE.json (1)
84-86
: New Localization Entries for Audit Log Events.
The additions for"auditLog.details.user.account.reset"
,"auditLog.details.user.keys.change"
, and"auditLog.details.user.setupCode.change"
correctly extend the localization for the new audit events. However, note a small typo in the setup code change entry: “Account Key geänert” should likely be “Account Key geändert”.Proposed diff:
- "auditLog.details.user.setupCode.change": "Account Key geänert", + "auditLog.details.user.setupCode.change": "Account Key geändert",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java
(4 hunks)backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
(3 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java
(1 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/UserKeysChangeEvent.java
(1 hunks)backend/src/main/java/org/cryptomator/hub/entities/events/UserSetupCodeChangeEvent.java
(1 hunks)backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Further_User_Audit_Events.sql
(1 hunks)frontend/src/common/auditlog.ts
(2 hunks)frontend/src/components/AuditLog.vue
(3 hunks)frontend/src/components/AuditLogUserKeysChange.vue
(1 hunks)frontend/src/components/AuditLogUserSetupCodeChanged.vue
(1 hunks)frontend/src/i18n/de-DE.json
(2 hunks)frontend/src/i18n/en-US.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
- frontend/src/i18n/en-US.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build and Test
🔇 Additional comments (8)
backend/src/main/java/org/cryptomator/hub/entities/events/UserSetupCodeChangeEvent.java (1)
1-40
: Well-structured JPA entity implementation!The implementation follows JPA best practices with proper annotations, encapsulation, and correct equals/hashCode implementation.
frontend/src/components/AuditLogUserSetupCodeChanged.vue (1)
1-18
: Clean and semantic template structure!The template uses proper semantic HTML elements and follows accessibility best practices.
backend/src/main/java/org/cryptomator/hub/entities/events/UserKeysChangeEvent.java (1)
1-52
: Well-implemented JPA entity with proper encapsulation!The implementation follows JPA best practices and includes proper field encapsulation, correct equals/hashCode implementation, and appropriate annotations.
frontend/src/components/AuditLogUserKeysChange.vue (1)
1-26
: Clean and semantic template structure!The template uses proper semantic HTML elements and follows accessibility best practices.
backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java (1)
22-24
: LGTM!The new event types are properly integrated with consistent patterns and alphabetical ordering.
Also applies to: 88-92
backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Further_User_Audit_Events.sql (2)
10-16
:audit_event_user_account_reset
Table Looks Good.
The table and its constraints are correctly named and reference the appropriate columns.
1-8
: 🛠️ Refactor suggestionReview Constraint Naming in
audit_event_user_keys_change
Table.
The primary and foreign key constraints are misnamed—they currently reference "USER_ACCOUNT_SETUP_COMPLETE" rather than "USER_KEYS_CHANGE". This inconsistency might lead to confusion later on.Proposed diff:
-CONSTRAINT "AUDIT_EVENT_USER_ACCOUNT_SETUP_COMPLETE_PK" PRIMARY KEY ("id"), -CONSTRAINT "AUDIT_EVENT_USER_ACCOUNT_SETUP_COMPLETE_FK_AUDIT_EVENT" FOREIGN KEY ("id") REFERENCES "audit_event" ("id") ON DELETE CASCADE +CONSTRAINT "AUDIT_EVENT_USER_KEYS_CHANGE_PK" PRIMARY KEY ("id"), +CONSTRAINT "AUDIT_EVENT_USER_KEYS_CHANGE_FK_AUDIT_EVENT" FOREIGN KEY ("id") REFERENCES "audit_event" ("id") ON DELETE CASCADEfrontend/src/i18n/de-DE.json (1)
95-95
: Remove Obsolete Localization Key.
The legacy key"auditLog.details.wot.signedIdentity"
appears to be outdated given the new audit log event structure. It is recommended to remove this key to avoid confusion and maintain consistency with the new entries.Proposed diff:
- "auditLog.details.wot.signedIdentity": "Identität beglaubigt",
backend/src/main/resources/org/cryptomator/hub/flyway/V18__Create_Further_User_Audit_Events.sql
Outdated
Show resolved
Hide resolved
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.
lgtm, but renaming that function wouldn't hurt
backend/src/main/java/org/cryptomator/hub/entities/events/EventLogger.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/org/cryptomator/hub/api/UsersResource.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Sebastian Stenzel <[email protected]>
This pull request extends the audit log by adding entries for
Fixes #279