diff --git a/pom.xml b/pom.xml index b2b0c528b1..eef43bc2aa 100644 --- a/pom.xml +++ b/pom.xml @@ -531,7 +531,7 @@ alfresco org.alfresco share - 6.20 + 7.8 6.1.0 0.0 @@ -558,10 +558,11 @@ 3.1.0 8080 - 2.9.8 + 2.9.9 + 2.9.9.3 0.25.0 1.10.19 - 42.2.5 + 42.2.6 5432 5.1.40 3306 diff --git a/rm-community/pom.xml b/rm-community/pom.xml index a24eb4a720..62dfef6908 100644 --- a/rm-community/pom.xml +++ b/rm-community/pom.xml @@ -57,7 +57,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${jackson-databind.version} com.fasterxml.jackson.datatype @@ -73,10 +73,10 @@ - 5.1.1.RELEASE + 5.1.8.RELEASE 6.1.2-ga - 6.1.0 + 6.1.0-RC3 true diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml index b471c996c0..477d319ef4 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/action-context.xml @@ -5,15 +5,6 @@ http://www.springframework.org/schema/beans/spring-beans.xsd"> - - - - - alfresco.module.org_alfresco_module_rm.messages.actions - - - - diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml index d999b109d7..4ccba8a2a0 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml @@ -64,6 +64,7 @@ alfresco.module.org_alfresco_module_rm.messages.admin-service alfresco.module.org_alfresco_module_rm.messages.records-management-service alfresco.module.org_alfresco_module_rm.messages.action-service + alfresco.module.org_alfresco_module_rm.messages.actions alfresco.module.org_alfresco_module_rm.messages.audit-service alfresco.module.org_alfresco_module_rm.messages.rm-events alfresco.module.org_alfresco_module_rm.messages.capability-service diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index 2167148609..0895e912b3 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -24,10 +24,10 @@ alfresco-platform 9.1-901.jdbc4 alfresco-governance-services-community-repo - - 7.5.1 - 7.33.12 - 7.34.1 + + 7.4 + 7.22 + 7.7 6.1.0 alfresco/alfresco-governance-repository-community diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/capability/policy/AssocPolicy.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/capability/policy/AssocPolicy.java index e22a04afd0..3ec8a3f0a6 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/capability/policy/AssocPolicy.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/capability/policy/AssocPolicy.java @@ -27,8 +27,12 @@ package org.alfresco.module.org_alfresco_module_rm.capability.policy; +import net.sf.acegisecurity.vote.AccessDecisionVoter; import org.alfresco.module.org_alfresco_module_rm.capability.impl.ViewRecordsCapability; +import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.service.cmr.security.AccessStatus; +import org.alfresco.service.cmr.security.PermissionService; import org.aopalliance.intercept.MethodInvocation; public class AssocPolicy extends AbstractBasePolicy @@ -40,8 +44,48 @@ public class AssocPolicy extends AbstractBasePolicy Class[] params, ConfigAttributeDefinition cad) { - NodeRef testNodeRef = getTestNode(invocation, params, cad.getParameters().get(0), cad.isParent()); - return getCapabilityService().getCapability(ViewRecordsCapability.NAME).evaluate(testNodeRef); + NodeRef source = null; + if (cad.getParameters().get(0) > -1) + { + source = getTestNode(invocation, params, cad.getParameters().get(0), cad.isParent()); + } + + NodeRef target = null; + if (cad.getParameters().get(1) > -1) + { + target = getTestNode(invocation, params, cad.getParameters().get(1), cad.isParent()); + } + + if (source != null && target != null) + { + // check the source node ref is a file plan component + if (nodeService.hasAspect(source, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT)) + { + return getCapabilityService().getCapability(ViewRecordsCapability.NAME).evaluate(source); + } + else + { + final boolean isFilePlanComponent = nodeService.hasAspect(target, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT); + final boolean hasViewRecordCapability = getCapabilityService().hasCapability(target, ViewRecordsCapability.NAME); + // allow association between a source non rm node and an rm node if the user + // has ViewRecordsCapability on the RM target node and write properties on the dm node + if ( isFilePlanComponent && + hasViewRecordCapability && + permissionService.hasPermission(source, PermissionService.WRITE_PROPERTIES).equals(AccessStatus.ALLOWED)) + { + return AccessDecisionVoter.ACCESS_GRANTED; + } + else + { + return AccessDecisionVoter.ACCESS_DENIED; + } + } + } + else + { + return AccessDecisionVoter.ACCESS_DENIED; + } } } +