mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.1 to HEAD
13857: Merged V2.2 to V3.1 7028-13041: (Record only) New merge path 13343: (Record onlY) Merged V3.1 to V2.2: 13330: Fix ETHREEOH-1408: Incorrect button name at "Manage Task: Submitted" page 13337: Fix for ETHREEOH-1409 and further fix for ETHREEOH-1408 13363: Fix ETWOTWO-1022 (Virtual website not found - Bad host name) 13386: Fix ETWOTWO-1145: WCM Form web script include is not handling ${} token format 13387: (Record only) Removed dev from version label 13621: (Record only) Merged V3.1 to V2.2 13497: Fixed ETHREEOH-1431: Authentication case sensitivity switch doesn't work Fixes ETWOTWO-1012 13828: ETWOTWO-1171 - checkpoint (alternative patch: resetWCMToGroupBasedPermissions) 13845: ETWOTWO-1171 - alternative patch: resetWCMToGroupBasedPermissions (part 2 of 2 - set layered/shared acls) 13855: Fixed line endings 13856: ETWOTWO-1171 - minor fix: wcmPostPermissionSnapshot patch target schema should be 95 ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V2.2:r7028-12305,12307-12310,12312-12319,12321,... Merged /alfresco/BRANCHES/V3.1:r13857 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14765 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -243,8 +243,8 @@ patch.spacesStoreGuestPermission.result=Granted READ permissions for GUEST on ro
|
||||
|
||||
patch.administratorGroup.description=Adds the 'ALFRESCO_ADMINISTRATORS' group.
|
||||
|
||||
patch.moveWCMToGroupBasedPermissionsPatch.description=Move WCM to group based permissions.
|
||||
patch.moveWCMToGroupBasedPermissionsPatch.result=WCM moved to group based permissions.
|
||||
patch.resetWCMToGroupBasedPermissionsPatch.description=Reset WCM to group based permissions.
|
||||
patch.resetWCMToGroupBasedPermissionsPatch.result=WCM reset to group based permissions.
|
||||
|
||||
patch.migrateVersionStoreUpdateCounter.description=Update internal version2Store counter (if needed).
|
||||
patch.migrateVersionStoreUpdateCounter.result=Update internal version2Store counter (if needed): {0}
|
||||
|
@@ -1534,28 +1534,30 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.moveWCMToGroupBasedPermissionsPatch" class="org.alfresco.repo.admin.patch.impl.MoveWCMToGroupBasedPermissionsPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.moveWCMToGroupBasedPermissionsPatch</value></property>
|
||||
<property name="description"><value>patch.moveWCMToGroupBasedPermissionsPatch.description</value></property>
|
||||
<bean id="patch.resetWCMToGroupBasedPermissionsPatch" class="org.alfresco.repo.admin.patch.impl.ResetWCMToGroupBasedPermissionsPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.resetWCMToGroupBasedPermissionsPatch</value></property>
|
||||
<property name="description"><value>patch.resetWCMToGroupBasedPermissionsPatch.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>2001</value></property>
|
||||
<property name="targetSchema"><value>2002</value></property>
|
||||
<!-- helper beans -->
|
||||
<property name="sessionFactory">
|
||||
<ref bean="sessionFactory" />
|
||||
</property>
|
||||
<property name="avmService">
|
||||
<ref bean="avmService" />
|
||||
</property>
|
||||
<property name="permissionService">
|
||||
<ref bean="permissionService" />
|
||||
</property>
|
||||
<property name="aclDaoComponent">
|
||||
<ref bean="aclDaoComponent" />
|
||||
</property>
|
||||
<property name="avmSnapShotTriggeredIndexingMethodInterceptor">
|
||||
<ref bean="avmSnapShotTriggeredIndexingMethodInterceptor" />
|
||||
<property name="personService">
|
||||
<ref bean="personService" />
|
||||
</property>
|
||||
<property name="authorityService">
|
||||
<ref bean="authorityService" />
|
||||
</property>
|
||||
<property name="qnameDAO">
|
||||
<ref bean="qnameDAO" />
|
||||
</property>
|
||||
<property name="replaceAllWith">
|
||||
<value>ContentManager</value>
|
||||
</property>
|
||||
@@ -1564,15 +1566,21 @@
|
||||
<ref bean="patch.zonedAuthorities" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="alternatives" >
|
||||
<list>
|
||||
<ref bean="patch.moveWCMToGroupBasedPermissionsPatch" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.wcmPostPermissionSnapshotPatch2" class="org.alfresco.repo.admin.patch.impl.WCMPostPermissionSnapshotPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.wcmPostPermissionSnapshotPatch2</value></property>
|
||||
<!-- note: does not need to be run if patch.wcmPostPermissionSnapshotPatch2 already applied -->
|
||||
<bean id="patch.wcmPostPermissionSnapshotPatch3" class="org.alfresco.repo.admin.patch.impl.WCMPostPermissionSnapshotPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.wcmPostPermissionSnapshotPatch3</value></property>
|
||||
<property name="description"><value>patch.wcmPostPermissionSnapshotPatch.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>2001</value></property>
|
||||
<property name="targetSchema"><value>2002</value></property>
|
||||
<!-- helper beans -->
|
||||
|
||||
<property name="avmService">
|
||||
<ref bean="AVMService" />
|
||||
</property>
|
||||
@@ -1584,11 +1592,47 @@
|
||||
</property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.moveWCMToGroupBasedPermissionsPatch" />
|
||||
<ref bean="patch.resetWCMToGroupBasedPermissionsPatch" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="alternatives" >
|
||||
<list>
|
||||
<ref bean="patch.wcmPostPermissionSnapshotPatch2" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- note: NOOP - superceded by patch.resetWCMToGroupBasedPermissionsPatch -->
|
||||
<bean id="patch.moveWCMToGroupBasedPermissionsPatch" class="org.alfresco.repo.admin.patch.impl.NoOpPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.moveWCMToGroupBasedPermissionsPatch</value></property>
|
||||
<property name="description"><value>patch.noOpPatch.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>2001</value></property>
|
||||
<property name="targetSchema"><value>2002</value></property>
|
||||
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.resetWCMToGroupBasedPermissionsPatch" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- note: NOOP - superceded by patch.wcmPostPermissionSnapshotPatch3 -->
|
||||
<bean id="patch.wcmPostPermissionSnapshotPatch2" class="org.alfresco.repo.admin.patch.impl.NoOpPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.wcmPostPermissionSnapshotPatch2</value></property>
|
||||
<property name="description"><value>patch.noOpPatch.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>2001</value></property>
|
||||
<property name="targetSchema"><value>2002</value></property>
|
||||
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.wcmPostPermissionSnapshotPatch3" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- Redeploy both direct and indirect submit processes for addition submit failure handling -->
|
||||
<bean id="patch.redeploySubmitProcess6" class="org.alfresco.repo.admin.patch.impl.GenericWorkflowPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.redeploySubmitProcess6</value></property>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -65,6 +65,8 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
PermissionService.WCM_CONTENT_CONTRIBUTOR, PermissionService.WCM_CONTENT_REVIEWER
|
||||
};
|
||||
|
||||
protected static final String WCM_STORE_SEPARATOR = "--";
|
||||
|
||||
private static final String MSG_SUCCESS = "patch.moveWCMToGroupBasedPermissionsPatch.result";
|
||||
|
||||
AVMSnapShotTriggeredIndexingMethodInterceptor avmSnapShotTriggeredIndexingMethodInterceptor;
|
||||
@@ -209,7 +211,7 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
}
|
||||
}
|
||||
|
||||
private void addToGroupIfRequired(String stagingStoreName, String user, String permission)
|
||||
protected void addToGroupIfRequired(String stagingStoreName, String user, String permission)
|
||||
{
|
||||
String shortName = stagingStoreName + "-" + permission;
|
||||
String group = this.authorityService.getName(AuthorityType.GROUP, shortName);
|
||||
@@ -248,7 +250,7 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
for (ChildAssociationRef ref : userInfoRefs)
|
||||
{
|
||||
NodeRef userInfoRef = ref.getChildRef();
|
||||
String username = (String) this.nodeService.getProperty(userInfoRef, WCMAppModel.PROP_WEBUSERNAME);
|
||||
//String username = (String) this.nodeService.getProperty(userInfoRef, WCMAppModel.PROP_WEBUSERNAME); // not used
|
||||
String userrole = (String) this.nodeService.getProperty(userInfoRef, WCMAppModel.PROP_WEBUSERROLE);
|
||||
|
||||
if (userrole.equals(PermissionService.ALL_PERMISSIONS))
|
||||
@@ -260,7 +262,7 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
}
|
||||
}
|
||||
|
||||
private void setStagingAreaPermissions(AVMStoreDescriptor store)
|
||||
protected void setStagingAreaPermissions(AVMStoreDescriptor store) throws Exception
|
||||
{
|
||||
QName propQName = QName.createQName(null, ".web_project.noderef");
|
||||
|
||||
@@ -308,7 +310,7 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
}
|
||||
}
|
||||
|
||||
private void setStagingAreaMasks(AVMStoreDescriptor store)
|
||||
protected void setStagingAreaMasks(AVMStoreDescriptor store)
|
||||
{
|
||||
// groups must exist
|
||||
NodeRef dirRef = AVMNodeConverter.ToNodeRef(-1, store.getName() + ":/www");
|
||||
@@ -369,7 +371,7 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
|
||||
}
|
||||
|
||||
private void setSandBoxMasks(AVMStoreDescriptor sandBoxStore)
|
||||
protected void setSandBoxMasks(AVMStoreDescriptor sandBoxStore)
|
||||
{
|
||||
// get the settings from the staging store ...
|
||||
|
||||
@@ -380,7 +382,7 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
|
||||
NodeRef dirRef = AVMNodeConverter.ToNodeRef(-1, sandBoxStore.getName() + ":/www");
|
||||
|
||||
Map<QName, PropertyValue> woof = this.avmService.getStoreProperties(stagingAreaName);
|
||||
//Map<QName, PropertyValue> woof = this.avmService.getStoreProperties(stagingAreaName); // not used
|
||||
PropertyValue pValue = this.avmService.getStoreProperty(stagingAreaName, propQName);
|
||||
|
||||
if (!isMaskSet(dirRef.getStoreRef(), PermissionService.ALL_AUTHORITIES, PermissionService.READ))
|
||||
@@ -428,12 +430,12 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
|
||||
private String extractOwner(String name)
|
||||
{
|
||||
int start = name.indexOf("--");
|
||||
int start = name.indexOf(WCM_STORE_SEPARATOR);
|
||||
if (start == -1)
|
||||
{
|
||||
throw new UnsupportedOperationException(name);
|
||||
}
|
||||
int end = name.indexOf("--", start + 1);
|
||||
int end = name.indexOf(WCM_STORE_SEPARATOR, start + 1);
|
||||
if (end == -1)
|
||||
{
|
||||
return name.substring(start + 2);
|
||||
@@ -441,9 +443,9 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
return name.substring(start + 2, end);
|
||||
}
|
||||
|
||||
private String extractStagingAreaName(String name)
|
||||
protected String extractStagingAreaName(String name)
|
||||
{
|
||||
int index = name.indexOf("--");
|
||||
int index = name.indexOf(WCM_STORE_SEPARATOR);
|
||||
if (index == -1)
|
||||
{
|
||||
throw new UnsupportedOperationException(name);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -5313,6 +5313,7 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
fService.setStoreProperty("main", QName.createQName("", ".other.property"), new PropertyValue(null, "other value"));
|
||||
Map<QName, PropertyValue> result = fService.queryStorePropertyKey("main", QName.createQName("", ".dns.%"));
|
||||
assertEquals(1, result.size());
|
||||
|
||||
fService.createStore("second");
|
||||
fService.setStoreProperty("second", QName.createQName("", ".dns.alice"), new PropertyValue(null, "alice-space"));
|
||||
Map<String, Map<QName, PropertyValue>> matches = fService.queryStoresPropertyKeys(QName.createQName("", ".dns.%"));
|
||||
@@ -5320,15 +5321,22 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
assertEquals(1, matches.get("second").size());
|
||||
assertEquals("alice-preview", matches.get("main").get(QName.createQName(null, ".dns.alice--preview")).getStringValue());
|
||||
assertEquals("alice-space", matches.get("second").get(QName.createQName(null, ".dns.alice")).getStringValue());
|
||||
|
||||
fService.createStore("third");
|
||||
fService.setStoreProperty("third", QName.createQName("", ".dns.someUPPERcase"), new PropertyValue(null, "someUPPERcase-space"));
|
||||
matches = fService.queryStoresPropertyKeys(QName.createQName("", ".dns.someuppercase%"));
|
||||
assertEquals(1, matches.get("third").size());
|
||||
assertEquals("someUPPERcase-space", matches.get("third").get(QName.createQName(null, ".dns.someUPPERcase")).getStringValue());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace(System.err);
|
||||
|
||||
throw e;
|
||||
}
|
||||
finally
|
||||
{
|
||||
fService.purgeStore("second");
|
||||
fService.purgeStore("third");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -339,7 +339,7 @@
|
||||
JOIN alf_namespace ns ON (ns.id = qn.ns_id)
|
||||
WHERE
|
||||
ns.uri LIKE :uri AND
|
||||
qn.local_name LIKE :localName
|
||||
upper(qn.local_name) LIKE upper(:localName)
|
||||
</sql-query>
|
||||
|
||||
<sql-query name="avm.GetStorePropertiesByStoreAndKeyPattern">
|
||||
@@ -353,7 +353,7 @@
|
||||
WHERE
|
||||
asp.avm_store_id = :storeId AND
|
||||
ns.uri LIKE :uri AND
|
||||
qn.local_name LIKE :localName
|
||||
upper(qn.local_name) LIKE upper(:localName)
|
||||
</sql-query>
|
||||
|
||||
<sql-query name="avm.DeleteStorePropertiesByType">
|
||||
|
Reference in New Issue
Block a user