mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Fix AR-442 Error performing background import of several .acp files - ConcurrentModificationException
- Support Import of ACP files that have Guest permission reference (re-map to Consumer) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2460 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1181,14 +1181,16 @@ public class ImporterComponent
|
||||
|
||||
// Create initial node (but, first disable behaviour for the node to be created)
|
||||
Set<QName> disabledBehaviours = getDisabledBehaviours(node);
|
||||
List<QName> alreadyDisabledBehaviours = new ArrayList<QName>();
|
||||
for (QName disabledBehaviour: disabledBehaviours)
|
||||
{
|
||||
boolean alreadyDisabled = behaviourFilter.disableBehaviour(disabledBehaviour);
|
||||
if (alreadyDisabled)
|
||||
{
|
||||
disabledBehaviours.remove(disabledBehaviour);
|
||||
alreadyDisabledBehaviours.add(disabledBehaviour);
|
||||
}
|
||||
}
|
||||
disabledBehaviours.removeAll(alreadyDisabledBehaviours);
|
||||
|
||||
// Build initial map of properties
|
||||
Map<QName, Serializable> initialProperties = bindProperties(node);
|
||||
@@ -1276,7 +1278,6 @@ public class ImporterComponent
|
||||
ChildAssociationRef childAssocRef = nodeService.getPrimaryParent(existingNodeRef);
|
||||
|
||||
// TODO: Check for root node
|
||||
|
||||
nodeService.removeChild(childAssocRef.getParentRef(), childAssocRef.getChildRef());
|
||||
}
|
||||
}
|
||||
|
@@ -38,6 +38,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessPermission;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.security.AuthorityType;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
@@ -340,6 +341,13 @@ public class NodeContext extends ElementContext
|
||||
*/
|
||||
public void addAccessControlEntry(AccessStatus accessStatus, String authority, String permission)
|
||||
{
|
||||
// Note: Map guest permission to Consumer permission - this is to handle the case where
|
||||
// exports made against a pre 1.2 RC2 release
|
||||
if (permission.equalsIgnoreCase("guest"))
|
||||
{
|
||||
permission = PermissionService.CONSUMER;
|
||||
}
|
||||
|
||||
ACE ace = new ACE();
|
||||
ace.accessStatus = accessStatus;
|
||||
ace.authority = authority;
|
||||
|
Reference in New Issue
Block a user