mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +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:
@@ -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
|
||||
@@ -64,6 +64,8 @@ public class MoveWCMToGroupBasedPermissionsPatch extends AbstractPatch
|
||||
PermissionService.WCM_CONTENT_MANAGER, PermissionService.WCM_CONTENT_PUBLISHER,
|
||||
PermissionService.WCM_CONTENT_CONTRIBUTOR, PermissionService.WCM_CONTENT_REVIEWER
|
||||
};
|
||||
|
||||
protected static final String WCM_STORE_SEPARATOR = "--";
|
||||
|
||||
private static final String MSG_SUCCESS = "patch.moveWCMToGroupBasedPermissionsPatch.result";
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user