Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

Rationale

We were sometimes failing to properly do audit logging for group events.

Changes

  • Ensure audit logging happens in the DB transaction
  • Ensure a container is set
  • Move group audit events to the main API instead of being handled by the caller
  • Propagate User object to be used for logging
  • Switch to passing Container objects instead of Strings representing the container's EntityId
  • Pass key values into GroupAuditEvent constructor, avoiding the need to refetch them later
  • Consistently set projectId in AuditTypeEvent constructor

{
_eventType = eventType;
_container = container;
_container = container.getId();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we take this a step further and keep _container and _project as Container? Looks like LogManager and AuditLogImpl turn these IDs back into Container objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I thought about this but didn't go all of the way initially. I pushed edits to make the switch.

@labkey-jeckels labkey-jeckels merged commit cb2ccc8 into develop Mar 25, 2025
8 of 10 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_52614_groupAuditing branch March 25, 2025 16:52
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.

3 participants