Martin Peřina has posted comments on this change. Change subject: core: Fix username for commands executed from Quartz jobs ......................................................................
Patch Set 3: (1 comment) https://gerrit.ovirt.org/#/c/39786/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 168: } Line 169: if (SessionDataContainer.getInstance().getPrincipalName(cmdContext.getEngineContext().getSessionId()) == null) { Line 170: // command was most probably executed from Quartz job, so session doesn't contain any user info Line 171: // we need to set username to fake internal user so audit logs will not contain "null@N/A" as username Line 172: setUserName("engine@internal"); > I'd just say "SYSTEM". Well, it doesn't conform to our current username format, but on the other hand we can emphasize, that "SYSTEM" is not regular user, but fake user under which oVirt internals are executed. So be it :-) Line 173: } else { Line 174: setUserName(SessionDataContainer.getInstance().getUserName(cmdContext.getEngineContext().getSessionId())); Line 175: } Line 176: ExecutionContext executionContext = cmdContext.getExecutionContext(); -- To view, visit https://gerrit.ovirt.org/39786 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc7bae0be74d3a5f7c5b7cfc4f3827a1dcfda8b7 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches