Skip to content

refactor(admin_audit): improve type safety and clarity in Action logging#57315

Draft
joshtrichards wants to merge 2 commits intomasterfrom
jtr/refactor-audit-action-log
Draft

refactor(admin_audit): improve type safety and clarity in Action logging#57315
joshtrichards wants to merge 2 commits intomasterfrom
jtr/refactor-audit-action-log

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Jan 2, 2026

  • Resolves: #

Summary

Changes:

  • Improved type safety and robustness
  • Enhanced error reporting
  • Improved code clarity
  • Better audit log output
  • Unit tests for Action

The original implementation had several edge cases that could produce unclear audit logs:

  • Boolean false values appeared as empty strings (invisible in logs)
  • Null values were indistinguishable from empty strings
  • Format string mismatches would crash rather than log the error
  • Variable names ($elements, $text) didn't clearly convey their purpose
  • Missing keys were reported one at a time rather than all at once

This refactoring makes the audit logging more defensive, maintainable, and produces clearer output for security auditing purposes.

TODO

  • ...

Checklist

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added enhancement feature: admin audit ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) and removed enhancement labels Jan 2, 2026
@joshtrichards joshtrichards added this to the Nextcloud 33 milestone Jan 2, 2026
@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: admin audit ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants