From 527a79acf2497529106375d0208cedf95dcb6e16 Mon Sep 17 00:00:00 2001 From: Roxana Lucanu-Ghetu Date: Mon, 30 Apr 2018 10:08:19 +0300 Subject: [PATCH 1/2] RM-5234 Fix Login filter --- .../audit/RecordsManagementAuditServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java index f4f13ac43f..6b46eb4e9c 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java @@ -1107,7 +1107,19 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean } else if (params.getEvent() != null) { - auditQueryParams.addSearchKey(RM_AUDIT_DATA_EVENT_NAME, params.getEvent()); + if (params.getEvent().equalsIgnoreCase("Login.Success")) + { + auditQueryParams.addSearchKey(RM_AUDIT_DATA_LOGIN_FULLNAME, null); + } + else + if (params.getEvent().equalsIgnoreCase("Login.Failure")) + { + auditQueryParams.addSearchKey(RM_AUDIT_DATA_LOGIN_ERROR, null); + } + else + { + auditQueryParams.addSearchKey(RM_AUDIT_DATA_EVENT_NAME, params.getEvent()); + } } // Get audit entries From 49291704f46f15ed208a6feb0e30e5bd3ccaa27a Mon Sep 17 00:00:00 2001 From: Roxana Lucanu-Ghetu Date: Mon, 30 Apr 2018 21:00:40 +0300 Subject: [PATCH 2/2] RM-5234 Minor refactor. --- .../audit/RecordsManagementAuditServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java index 6b46eb4e9c..35e7756bf5 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java @@ -1107,12 +1107,11 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean } else if (params.getEvent() != null) { - if (params.getEvent().equalsIgnoreCase("Login.Success")) + if (params.getEvent().equalsIgnoreCase(RM_AUDIT_EVENT_LOGIN_SUCCESS)) { auditQueryParams.addSearchKey(RM_AUDIT_DATA_LOGIN_FULLNAME, null); } - else - if (params.getEvent().equalsIgnoreCase("Login.Failure")) + else if (params.getEvent().equalsIgnoreCase(RM_AUDIT_EVENT_LOGIN_FAILURE)) { auditQueryParams.addSearchKey(RM_AUDIT_DATA_LOGIN_ERROR, null); }