Wired AuditMethodInterceptor into new audit framework

- Two new repo properties to control auditing:
     audit.enabled=false
     audit.useNewConfig=false
 - Auditing was enabled by default, but it is not enabled any more!
   The property has to be set in alfresco-global.properties
 - Unit tests for auditing successful and failed authentication attempts


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-09-24 14:52:25 +00:00
parent fc3431ecb4
commit 7c68847cb6
8 changed files with 581 additions and 52 deletions

View File

@@ -411,7 +411,10 @@ public abstract class AbstractAuditDAOImpl implements AuditDAO
}
// Resolve the application and username
String auditAppName = (String) propertyValueDAO.getPropertyValueById(row.getAuditAppNameId()).getSecond();
String auditUser = (String) propertyValueDAO.getPropertyValueById(row.getAuditUserId()).getSecond();
Long auditUserId = row.getAuditUserId();
String auditUser = auditUserId == null
? null
: (String) propertyValueDAO.getPropertyValueById(auditUserId).getSecond();
more = callback.handleAuditEntry(
row.getAuditEntryId(),