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

57136: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      56919: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
         56833: Merged DEV to V4.1-BUG-FIX (4.1.7)
            50386: MNT-8401: Audit filter for alfresco-access/logout does not work.
               - AuditComponentImpl#audit() method was updated. The new functionality was introduced that allow to check mapped values of audit filters.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61761 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 19:59:34 +00:00
parent 354081e5dd
commit 9da70751d1

View File

@@ -669,6 +669,19 @@ public class AuditComponentImpl implements AuditComponent
Map<String, DataGenerator> generators = application.getDataGenerators(generatorKeys);
Map<String, Serializable> auditData = generateData(generators);
// MNT-8401
for (Map.Entry<String, Serializable> value : auditData.entrySet())
{
String root = value.getKey();
int index = root.lastIndexOf("/");
Map<String, Serializable> argc = new HashMap<String, Serializable>(1);
argc.put(root.substring(index, root.length()).substring(1), value.getValue());
if (!auditFilter.accept(root.substring(0, index), argc))
{
return Collections.emptyMap();
}
}
// Now extract values
Map<String, Serializable> extractedData = AuthenticationUtil.runAs(new RunAsWork<Map<String, Serializable>>()
{