Eli Mesika has uploaded a new change for review.

Change subject: core:entity rename log missing initiating user...
......................................................................

core:entity rename log missing initiating user...

entity rename log missing initiating user name

When you rename an entity, the initiating user who had renamed the
entity is missing from the audit log message.

this patch adds the current user name to the rename log message when an
entity is renamed.

Change-Id: If86bf6def2bce231c0acf4290cacd526ba074eae
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/28159/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 5b55444..312f8c9 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -634,6 +634,7 @@
                 logable.addCustomValue("EntityType", entityType);
                 logable.addCustomValue("OldEntityName", oldEntityName);
                 logable.addCustomValue("NewEntityName", newEntityName);
+                logable.addCustomValue("UserName", 
getCurrentUser().getLoginName());
                 renameable.setEntityId(logable);
                 auditLog(logable, AuditLogType.ENTITY_RENAMED);
             }
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
index 6fa049e..37b40ea 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -656,7 +656,7 @@
 AUTH_FAILED_NO_USER_INFORMATION_WAS_FOUND=User ${UserName} cannot login, no 
user information was found. Please contact the system administrator.
 AUTH_FAILED_CLIENT_NOT_FOUND_IN_KERBEROS_DATABASE=User ${UserName} cannot 
login, user was not found in domain. Please contact the system administrator.
 AUTH_FAILED_INTERNAL_KERBEROS_ERROR=User ${UserName} cannot login, an internal 
error has ocurred in the Kerberos implementation of the JVM. Please contact the 
system administrator.
-ENTITY_RENAMED=${EntityType} ${OldEntityName} was renamed from 
${OldEntityName} to ${NewEntityName}.
+ENTITY_RENAMED=${EntityType} ${OldEntityName} was renamed from 
${OldEntityName} to ${NewEntityName} by ${UserName}.
 USER_ADD_EXTERNAL_JOB=New external Job ${description} was added by user 
${UserName}
 USER_ADD_EXTERNAL_JOB_FAILED=Failed to add new external Job ${description}
 STORAGE_DOMAIN_TASKS_ERROR=Storage Domain ${StorageDomainName} is down while 
there are tasks running on it. These tasks may fail.


-- 
To view, visit http://gerrit.ovirt.org/28159
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If86bf6def2bce231c0acf4290cacd526ba074eae
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to