mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge remote-tracking branch 'remotes/origin/release/V3.2.0.x' into merge-3.2/MNT-21292_DownloadViaPost
# Conflicts: # rm-enterprise/rm-enterprise-repo/src/main/java/org/alfresco/repo/search/impl/solr/ExtendedSolrQueryHTTPClient.java
This commit is contained in:
7
pom.xml
7
pom.xml
@@ -531,7 +531,7 @@
|
||||
<alfresco.db.username>alfresco</alfresco.db.username>
|
||||
<alfresco.groupId>org.alfresco</alfresco.groupId>
|
||||
<alfresco.share.artifactId>share</alfresco.share.artifactId>
|
||||
<alfresco-spring-webscripts.version>6.20</alfresco-spring-webscripts.version>
|
||||
<alfresco-spring-webscripts.version>7.8</alfresco-spring-webscripts.version>
|
||||
<api.explorer.version>6.1.0</api.explorer.version>
|
||||
<!-- Set this here and override it in the community and enterprise modules. -->
|
||||
<alfresco.version>0.0</alfresco.version>
|
||||
@@ -558,10 +558,11 @@
|
||||
<maven.resources.version>3.1.0</maven.resources.version>
|
||||
<maven.tomcat.port>8080</maven.tomcat.port>
|
||||
|
||||
<jackson.version>2.9.8</jackson.version>
|
||||
<jackson.version>2.9.9</jackson.version>
|
||||
<jackson-databind.version>2.9.9.3</jackson-databind.version>
|
||||
<fabric8.docker.version>0.25.0</fabric8.docker.version>
|
||||
<mockito.version>1.10.19</mockito.version>
|
||||
<postgresql.version>42.2.5</postgresql.version>
|
||||
<postgresql.version>42.2.6</postgresql.version>
|
||||
<postgresql.port>5432</postgresql.port>
|
||||
<mysql.version>5.1.40</mysql.version>
|
||||
<mysql.port>3306</mysql.port>
|
||||
|
@@ -57,7 +57,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<version>${jackson-databind.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
@@ -73,10 +73,10 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
<spring.version>5.1.1.RELEASE</spring.version>
|
||||
<spring.version>5.1.8.RELEASE</spring.version>
|
||||
|
||||
<alfresco.version>6.1.2-ga</alfresco.version>
|
||||
<share.version>6.1.0</share.version>
|
||||
<share.version>6.1.0-RC3</share.version>
|
||||
<!-- The properties app.amp.* need to be set for share to work. -->
|
||||
<app.filtering.enabled>true</app.filtering.enabled>
|
||||
</properties>
|
||||
|
@@ -5,15 +5,6 @@
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
|
||||
<!-- I18N -->
|
||||
<bean id="rmActionResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
||||
<property name="resourceBundles">
|
||||
<list>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.actions</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Declare as Record action -->
|
||||
<!-- TODO rename -->
|
||||
<bean id="create-record" parent="action-executer" class="org.alfresco.module.org_alfresco_module_rm.action.dm.CreateRecordAction">
|
||||
|
@@ -64,6 +64,7 @@
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.admin-service</value>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.records-management-service</value>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.action-service</value>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.actions</value>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.audit-service</value>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.rm-events</value>
|
||||
<value>alfresco.module.org_alfresco_module_rm.messages.capability-service</value>
|
||||
|
@@ -24,11 +24,11 @@
|
||||
<alfresco.repo.artifactId>alfresco-platform</alfresco.repo.artifactId>
|
||||
<alfresco.postgres.version>9.1-901.jdbc4</alfresco.postgres.version>
|
||||
<ags.artifactId>alfresco-governance-services-community-repo</ags.artifactId>
|
||||
<!-- 6.0 changes -->
|
||||
<!-- 6.1.2-ga changes -->
|
||||
<dependency.alfresco-core.version>7.5.1</dependency.alfresco-core.version>
|
||||
<dependency.alfresco-repository.version>7.33.12</dependency.alfresco-repository.version>
|
||||
<dependency.alfresco-remote-api.version>7.34.1</dependency.alfresco-remote-api.version>
|
||||
<alfresco.alfresco-share-services.version>6.1.0</alfresco.alfresco-share-services.version>
|
||||
<dependency.alfresco-repository.version>7.43</dependency.alfresco-repository.version>
|
||||
<dependency.alfresco-remote-api.version>7.35</dependency.alfresco-remote-api.version>
|
||||
<alfresco.alfresco-share-services.version>6.1.0-RC3</alfresco.alfresco-share-services.version>
|
||||
<image.name>alfresco/alfresco-governance-repository-community</image.name>
|
||||
|
||||
<maven.javadoc.skip>false</maven.javadoc.skip>
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user