Merged V2.2 to HEAD

8033: Merged V2.1 to V2.2
      7728: Fix and patch for WCM-893 - now only users explicitly invited to a Web Project can see it in the web-client
      7954: Missing file from CHK-2018 - Fix and patch for WCM-893
   8042: Fixed AWC-1588: Exception message for unsupported target mimetype


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8452 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-07 04:11:23 +00:00
parent 0ec2646938
commit f8d2a5d084
5 changed files with 136 additions and 13 deletions

View File

@@ -155,7 +155,7 @@ patch.webscriptsExtension.description=Adds Web Scripts Extension to Data Diction
patch.AVMLayeredSnapshot.description=Set indirectionVersion on Layered Nodes.
patch.AVMLayeredSnapshot.result=Layered Node indirectionVersions set.
patch.groupMembersAsIdentifiers.description=Reindex usr:authorityContainer members as identifiers=======
patch.groupMembersAsIdentifiers.description=Reindex usr:authorityContainer members as identifiers
patch.genericWorkflow.result.deployed=Re-deployed {0} workflows.
@@ -209,3 +209,6 @@ patch.updateAvmPermissions.result=Updated ACLs. Created {0} defining and {1} lay
patch.wcmPermissionPatch.description=Fix ACLs so they are only set on the staging area store.
patch.wcmPermissionPatch.result=Updated ACLs: ACLS are moved to the staging area store and removed from all other stores. They are now applied via layering.
patch.avmWebProjectInheritPermissions.description=Break inheritance of permissions on wca:webfolder object to hide access by default.
patch.avmWebProjectInheritPermissions.result=Removed inheritance of permissions on all wca:webfolder objects.

View File

@@ -1340,7 +1340,7 @@
</property>
</bean>
<bean id="patch.wcmPermissionPatch" class="org.alfresco.repo.admin.patch.impl.WCMPermissionPatch" parent="basePatch" >
<bean id="patch.wcmPermissionPatch" class="org.alfresco.repo.admin.patch.impl.WCMPermissionPatch" parent="basePatch" >
<property name="id"><value>patch.wcmPermissionPatch</value></property>
<property name="description"><value>patch.wcmPermissionPatch.description</value></property>
<property name="fixesFromSchema"><value>0</value></property>
@@ -1348,13 +1348,36 @@
<property name="targetSchema"><value>122</value></property>
<!-- helper beans -->
<property name="avmService">
<ref bean="avmService" />
</property>
<property name="permissionService">
<ref bean="permissionService" />
</property>
<property name="avmSnapShotTriggeredIndexingMethodInterceptor">
<ref bean="avmSnapShotTriggeredIndexingMethodInterceptor" />
</property>
<ref bean="avmService" />
</property>
<property name="permissionService">
<ref bean="permissionService" />
</property>
<property name="avmSnapShotTriggeredIndexingMethodInterceptor">
<ref bean="avmSnapShotTriggeredIndexingMethodInterceptor" />
</property>
</bean>
<bean id="patch.avmWebProjectInheritPermissions" class="org.alfresco.repo.admin.patch.impl.AVMWebProjectInheritPermissionsPatch" parent="basePatch">
<property name="id"><value>patch.avmWebProjectInheritPermissions</value></property>
<property name="description"><value>patch.avmWebProjectInheritPermissions.description</value></property>
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>122</value></property>
<property name="targetSchema"><value>123</value></property>
<property name="spacesImporterBootstrap">
<ref bean="spacesBootstrap" />
</property>
<property name="indexerAndSearcher">
<ref bean="indexerAndSearcherFactory" />
</property>
<property name="permissionService">
<ref bean="permissionService"/>
</property>
<property name="dependsOn" >
<list>
<ref bean="patch.wcmPermissionPatch" />
</list>
</property>
</bean>
</beans>

View File

@@ -19,4 +19,4 @@ version.build=@build-number@
# Schema number
version.schema=122
version.schema=123

View File

@@ -0,0 +1,97 @@
/*
* Copyright (C) 2005-2007 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
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing
*/
package org.alfresco.repo.admin.patch.impl;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.repo.admin.patch.AbstractPatch;
import org.alfresco.repo.importer.ImporterBootstrap;
import org.alfresco.repo.search.Indexer;
import org.alfresco.repo.search.IndexerAndSearcher;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.ResultSetRow;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.PermissionService;
/**
* Patch to break the inheritance of permissions on AVM Web Project Folders.
* This removes the need for admins to write a script or similar to by default hide web folders
* to all users except those explicitly invited (given permissions) to the project.
*
* @author Kevin Roast
*/
public class AVMWebProjectInheritPermissionsPatch extends AbstractPatch
{
private static final String MSG_SUCCESS = "patch.avmWebProjectInheritPermissions.result";
private ImporterBootstrap spacesImporterBootstrap;
private IndexerAndSearcher indexerAndSearcher;
private PermissionService permissionService;
public void setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
{
this.indexerAndSearcher = indexerAndSearcher;
}
public void setSpacesImporterBootstrap(ImporterBootstrap spacesImporterBootstrap)
{
this.spacesImporterBootstrap = spacesImporterBootstrap;
}
public void setPermissionService(PermissionService permissionService)
{
this.permissionService = permissionService;
}
/* (non-Javadoc)
* @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
*/
@Override
protected String applyInternal() throws Exception
{
SearchParameters sp = new SearchParameters();
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery("TYPE:\"wca:webfolder\"");
sp.addStore(spacesImporterBootstrap.getStoreRef());
ResultSet rs = null;
try
{
rs = searchService.query(sp);
for (ResultSetRow row : rs)
{
this.permissionService.setInheritParentPermissions(row.getNodeRef(), false);
}
}
finally
{
if (rs != null)
{
rs.close();
}
}
return I18NUtil.getMessage(MSG_SUCCESS);
}
}

View File

@@ -192,7 +192,7 @@ public class OpenOfficeContentTransformer extends AbstractContentTransformer
if (targetFormat == null)
{
// target format is not recognised
throw new ContentIOException("No OpenOffice document format for target extension: " + sourceExtension);
throw new ContentIOException("No OpenOffice document format for target extension: " + targetExtension);
}
// get the family of the target document
DocumentFamily sourceFamily = sourceFormat.getFamily();