Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

79033: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      78970: Merged DEV to V4.2-BUG-FIX (4.2.4)
         78847: MNT-11760 : No auditing entries generated for failed logins with audit.alfresco-access.enabled=true configured
         Fixed audit logging for failed logins.
         78848: MNT-11760 : No auditing entries generated for failed logins with audit.alfresco-access.enabled=true configured
         Fixed tests to highlight the issue.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82681 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-09-03 15:12:17 +00:00
parent 3726796d43
commit b91927c48c
4 changed files with 42 additions and 9 deletions

View File

@@ -484,17 +484,21 @@ public class AuditComponentImpl implements AuditComponent
}
}
/**
* {@inheritDoc}
* @since 3.2
*/
@Override
public Map<String, Serializable> recordAuditValues(String rootPath, Map<String, Serializable> values)
{
return recordAuditValuesWithUserFilter(rootPath, values, true);
}
@Override
public Map<String, Serializable> recordAuditValuesWithUserFilter(String rootPath, Map<String, Serializable> values, boolean useUserFilter)
{
ParameterCheck.mandatory("rootPath", rootPath);
AuditApplication.checkPathFormat(rootPath);
String username = AuthenticationUtil.getFullyAuthenticatedUser();
if (values == null || values.isEmpty() || !areAuditValuesRequired() || !userAuditFilter.acceptUser(username) || !auditFilter.accept(rootPath, values))
if (values == null || values.isEmpty() || !areAuditValuesRequired()
|| !(userAuditFilter.acceptUser(username) || !useUserFilter) || !auditFilter.accept(rootPath, values))
{
return Collections.emptyMap();
}