RM-2396 (Upload record via WebDAV fails with org.alfresco.repo.security.permissions.AccessDeniedException)

This commit is contained in:
Tuna Aksoy
2017-03-13 01:01:33 +00:00
parent 98628c75de
commit 5aa3721b91
2 changed files with 42 additions and 17 deletions

View File

@@ -1,8 +1,18 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<!-- Helper beans -->
<bean id="baseTransaction" abstract="true" class="org.springframework.transaction.interceptor.TransactionInterceptor">
@@ -1060,8 +1070,21 @@
<property name="renditionService" ref="RenditionService" />
<property name="dispositionService" ref="DispositionService"/>
<property name="recordableVersionService" ref="RecordableVersionService"/>
<property name="alwaysEditURIs" ref="recordService_alwaysEditURIs" />
</bean>
<!-- Defines a list of namespace URIs for properties, which should be always editable -->
<util:list id="recordService_alwaysEditURIs" value-type="java.lang.String">
<value>http://www.alfresco.org/model/security/1.0</value>
<value>http://www.alfresco.org/model/system/1.0</value>
<value>http://www.alfresco.org/model/workflow/1.0</value>
<value>http://www.alfresco.org/model/application/1.0</value>
<value>http://www.alfresco.org/model/datalist/1.0</value>
<value>http://www.alfresco.org/model/dictionary/1.0</value>
<value>http://www.alfresco.org/model/bpm/1.0</value>
<value>http://www.alfresco.org/model/rendition/1.0</value>
</util:list>
<bean id="recordMetadataAspectBootstrap" class="org.alfresco.module.org_alfresco_module_rm.record.RecordMetadataBootstrap" init-method="init" abstract="true">
<property name="recordService" ref="recordService"/>
<property name="namespaceService" ref="namespaceService"/>

View File

@@ -27,8 +27,6 @@
package org.alfresco.module.org_alfresco_module_rm.record;
import static com.google.common.collect.Lists.newArrayList;
import static org.alfresco.repo.policy.Behaviour.NotificationFrequency.FIRST_EVENT;
import static org.alfresco.repo.policy.Behaviour.NotificationFrequency.TRANSACTION_COMMIT;
import static org.alfresco.repo.policy.annotation.BehaviourKind.ASSOCIATION;
@@ -151,18 +149,22 @@ public class RecordServiceImpl extends BaseBehaviourBean
};
/** always edit model URI's */
private List<String> alwaysEditURIs;
/**
* @param alwaysEditURIs the alwaysEditURIs to set
*/
public void setAlwaysEditURIs(List<String> alwaysEditURIs)
{
this.alwaysEditURIs = alwaysEditURIs;
}
/**
* @return the alwaysEditURIs
*/
protected List<String> getAlwaysEditURIs()
{
return newArrayList(
NamespaceService.SECURITY_MODEL_1_0_URI,
NamespaceService.SYSTEM_MODEL_1_0_URI,
NamespaceService.WORKFLOW_MODEL_1_0_URI,
NamespaceService.APP_MODEL_1_0_URI,
NamespaceService.DATALIST_MODEL_1_0_URI,
NamespaceService.DICTIONARY_MODEL_1_0_URI,
NamespaceService.BPM_MODEL_1_0_URI,
NamespaceService.RENDITION_MODEL_1_0_URI
);
return this.alwaysEditURIs;
}
/** record model URI's */
@@ -1037,7 +1039,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
{
// make record
makeRecord(record);
renameRecord(record);
renameRecord(record);
}
return record;