mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged BRANCHES/V2.2 to BRANCHES/V2.3:
111064: RM-2391 - also check for the access audit capability on each node from the report git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@111065 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -921,6 +921,7 @@
|
|||||||
<property name="recordsManagementActionService" ref="RecordsManagementActionService" />
|
<property name="recordsManagementActionService" ref="RecordsManagementActionService" />
|
||||||
<property name="filePlanService" ref="FilePlanService" />
|
<property name="filePlanService" ref="FilePlanService" />
|
||||||
<property name="namespaceService" ref="NamespaceService" />
|
<property name="namespaceService" ref="NamespaceService" />
|
||||||
|
<property name="capabilityService" ref="CapabilityService" />
|
||||||
<property name="ignoredAuditProperties">
|
<property name="ignoredAuditProperties">
|
||||||
<list>
|
<list>
|
||||||
<value>cm:lastThumbnailModification</value>
|
<value>cm:lastThumbnailModification</value>
|
||||||
|
@@ -40,6 +40,7 @@ import org.alfresco.model.ContentModel;
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction;
|
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionService;
|
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.audit.event.AuditEvent;
|
import org.alfresco.module.org_alfresco_module_rm.audit.event.AuditEvent;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||||
import org.alfresco.repo.audit.AuditComponent;
|
import org.alfresco.repo.audit.AuditComponent;
|
||||||
import org.alfresco.repo.audit.model.AuditApplication;
|
import org.alfresco.repo.audit.model.AuditApplication;
|
||||||
@@ -61,6 +62,7 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
|||||||
import org.alfresco.service.cmr.repository.MLText;
|
import org.alfresco.service.cmr.repository.MLText;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
|
import org.alfresco.service.cmr.security.AccessStatus;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
@@ -98,6 +100,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
/** Logger */
|
/** Logger */
|
||||||
private static Log logger = LogFactory.getLog(RecordsManagementAuditServiceImpl.class);
|
private static Log logger = LogFactory.getLog(RecordsManagementAuditServiceImpl.class);
|
||||||
|
|
||||||
|
private static final String ACCESS_AUDIT_CAPABILITY = "AccessAudit";
|
||||||
|
|
||||||
private static final String KEY_RM_AUDIT_NODE_RECORDS = "RMAUditNodeRecords";
|
private static final String KEY_RM_AUDIT_NODE_RECORDS = "RMAUditNodeRecords";
|
||||||
|
|
||||||
protected static final String RM_AUDIT_EVENT_LOGIN_SUCCESS = "Login.Success";
|
protected static final String RM_AUDIT_EVENT_LOGIN_SUCCESS = "Login.Success";
|
||||||
@@ -179,6 +183,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
private RecordsManagementActionService rmActionService;
|
private RecordsManagementActionService rmActionService;
|
||||||
private FilePlanService filePlanService;
|
private FilePlanService filePlanService;
|
||||||
private NamespaceService namespaceService;
|
private NamespaceService namespaceService;
|
||||||
|
protected CapabilityService capabilityService;
|
||||||
|
|
||||||
private boolean shutdown = false;
|
private boolean shutdown = false;
|
||||||
|
|
||||||
@@ -270,6 +275,17 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
this.namespaceService = namespaceService;
|
this.namespaceService = namespaceService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param capabilityService capability service
|
||||||
|
*/
|
||||||
|
public void setCapabilityService(CapabilityService capabilityService)
|
||||||
|
{
|
||||||
|
this.capabilityService = capabilityService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ignoredAuditProperties
|
* @param ignoredAuditProperties
|
||||||
@@ -904,6 +920,13 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
// Skip it
|
// Skip it
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( nodeRef != null &&
|
||||||
|
!AccessStatus.ALLOWED.equals(
|
||||||
|
capabilityService.getCapabilityAccessState(nodeRef, ACCESS_AUDIT_CAPABILITY)))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Refactor this to use the builder pattern
|
// TODO: Refactor this to use the builder pattern
|
||||||
RecordsManagementAuditEntry entry = new RecordsManagementAuditEntry(
|
RecordsManagementAuditEntry entry = new RecordsManagementAuditEntry(
|
||||||
|
Reference in New Issue
Block a user