Skip to content

Conversation

@slaemmer
Copy link
Contributor

@slaemmer slaemmer commented Feb 9, 2026

Purpose

Adds settings infrastructure for user audit logging as part of MODAUD-296, the first implementation step of UXPROD-5171 (Users Version history / Change tracker).

Creates a new audit.users setting group with an enabled flag (defaulting to false) so that user audit logging can be toggled via the existing audit config API.

Approach

Followed the existing pattern established by the audit.inventory and audit.authority setting groups:

  • Added USER / USER_RECORDS_ENABLED enum constants
  • Added database seed records for the new group and its enabled setting
  • Added two permissions for reading and updating user audit settings
  • Added integration tests covering CRUD and permission enforcement

The REST API is generic and required no changes. The enabled flag defaults to false since user event processing is not yet implemented.

Pre-Merge Checklist:

  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • Were any API paths or methods changed, added or removed?
    • Were there any schema changes?
    • Did any of the interface versions change?
    • Were permissions changed, added, or removed?
    • Are there new interface dependencies?
    • There are no breaking changes in this PR.
    • Check logging

New permissions added (non-breaking):

  • audit.config.groups.settings.audit.users.collection.get
  • audit.config.groups.settings.audit.users.enabled.item.put

Implements settings infrastructure for user audit logging:

- Add USER setting group (audit.users) to enum and database
- Add USER_RECORDS_ENABLED setting (defaults to false)
- Add permissions for user audit configuration:
    - audit.config.groups.settings.audit.users.collection.get
    - audit.config.groups.settings.audit.users.enabled.item.put
- Add integration tests for user settings CRUD and permissions

This creates the configuration foundation for future user event
processing. The enabled flag defaults to false (disabled) and can
be toggled via the existing /audit/config/groups API.
@slaemmer slaemmer marked this pull request as ready for review February 10, 2026 08:21
@slaemmer slaemmer requested a review from a team February 10, 2026 08:25
@sonarqubecloud
Copy link

@slaemmer slaemmer merged commit c180d33 into master Feb 11, 2026
4 checks passed
@slaemmer slaemmer deleted the MODAUD-296 branch February 11, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants