-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
7.5.1
-
None
I am using CommandContext.getOperationLOgManager() to write custom Operation Log entries.
However, though I set a UserId on the OpLogContext.setUserId, it gets overwritten in
protected void fireUserOperationLog(final UserOperationLogContext context) { context.setUserId(getAuthenticatedUserId()); HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() { @Override public List<HistoryEvent> createHistoryEvents(HistoryEventProducer producer) { return producer.createUserOperationLogEvents(context); } }); }
This is not the desired behavior since we do not use IdentityService functions. I guess a simple and valid fix would be to set the userId only when it has not been set before:
if (context.getUserId() == null) { context.setUserId(getAuthenticatedUserId()); }