mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fix to only propagate ACLs down primary relationships
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9101 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -48,13 +48,10 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
|
||||
/**
|
||||
* DAO layer for the improved ACL implemtentation.
|
||||
*
|
||||
* This layer is responsible for setting ACLs and any cascade behaviour required.
|
||||
* It also implements the migration from the old implementation to the new.
|
||||
* DAO layer for the improved ACL implemtentation. This layer is responsible for setting ACLs and any cascade behaviour
|
||||
* required. It also implements the migration from the old implementation to the new.
|
||||
*
|
||||
* @author andyh
|
||||
*
|
||||
*/
|
||||
public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
{
|
||||
@@ -81,6 +78,7 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
|
||||
/**
|
||||
* Set the ACL DAO components
|
||||
*
|
||||
* @param aclDaoComponent
|
||||
*/
|
||||
public void setAclDaoComponent(AclDaoComponent aclDaoComponent)
|
||||
@@ -100,6 +98,7 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
|
||||
/**
|
||||
* Set the node service.
|
||||
*
|
||||
* @param nodeService
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
@@ -195,10 +194,13 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
// Do the children first
|
||||
|
||||
for (ChildAssociationRef child : nodeService.getChildAssocs(nodeRef))
|
||||
{
|
||||
if (child.isPrimary())
|
||||
{
|
||||
CounterSet update = fixOldDmAcls(child.getChildRef());
|
||||
result.add(update);
|
||||
}
|
||||
}
|
||||
|
||||
DbAccessControlList existingAcl = getAccessControlList(nodeRef);
|
||||
|
||||
@@ -290,6 +292,8 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
List<ChildAssociationRef> children = nodeService.getChildAssocs(nodeRef);
|
||||
|
||||
for (ChildAssociationRef child : children)
|
||||
{
|
||||
if (child.isPrimary())
|
||||
{
|
||||
DbAccessControlList acl = getAccessControlList(child.getChildRef());
|
||||
|
||||
@@ -326,7 +330,7 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
hibernateSessionHelper.resetAndRemoveMark();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,6 +362,8 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
List<ChildAssociationRef> children = nodeService.getChildAssocs(nodeRef);
|
||||
|
||||
for (ChildAssociationRef child : children)
|
||||
{
|
||||
if (child.isPrimary())
|
||||
{
|
||||
DbAccessControlList acl = getAccessControlList(child.getChildRef(), nodeDaoService);
|
||||
|
||||
@@ -381,6 +387,7 @@ public class DMAccessControlListDAO implements AccessControlListDAO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static DbAccessControlList getAccessControlList(NodeRef nodeRef, NodeDaoService nodeDaoService)
|
||||
{
|
||||
|
Reference in New Issue
Block a user