mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.9 to HEAD
10561: Merged V2.2 to V2.9 9882: Node DAO separation 10580: Merged V2.2 to V2.9 10576: Missing onContentDelete firing 10577: More policies: beforeCreateNode and beforeDeleteNode when archiving nodes in hierarchy - Updated UsageService and TenantService to conform to the new node DAO (more separation) - TODO: Tenant node interceptor not present. This must be added if Multi-Tentant features are required. - NodeMonitor event processing now checks that the nodes are still valid before processing. - onMove firing was breaking NodeMonitor. Changed onMove to not fire when nodes are moved between stores. - Raised ALFCOM-1912: ClassCastException when accessing property of type ver2:versionNumber - Pull setFixedAcls fully into Node DAO for simpler and speedier execution git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10709 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
package org.alfresco.repo.security.permissions.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -370,7 +369,7 @@ public class PermissionServiceTest extends AbstractPermissionTest
|
||||
|
||||
private void printPermissions(NodeRef nodeRef, String path)
|
||||
{
|
||||
Long id = nodeDaoService.getNode(nodeRef).getAccessControlList().getId();
|
||||
Long id = nodeDaoService.getNodePair(nodeRef).getFirst();
|
||||
System.out.println(path + " has "+id);
|
||||
for(AccessControlEntry entry : aclDaoComponent.getAccessControlList(id).getEntries())
|
||||
{
|
||||
@@ -1094,6 +1093,7 @@ public class PermissionServiceTest extends AbstractPermissionTest
|
||||
NodeRef n7 = nodeService.createNode(n6, ContentModel.ASSOC_CONTAINS, QName.createQName("{namespace}seven"), ContentModel.TYPE_FOLDER).getChildRef();
|
||||
NodeRef n8 = nodeService.createNode(n7, ContentModel.ASSOC_CONTAINS, QName.createQName("{namespace}eight"), ContentModel.TYPE_FOLDER).getChildRef();
|
||||
NodeRef n9 = nodeService.createNode(n8, ContentModel.ASSOC_CONTAINS, QName.createQName("{namespace}nine"), ContentModel.TYPE_FOLDER).getChildRef();
|
||||
@SuppressWarnings("unused")
|
||||
NodeRef n10 = nodeService.createNode(n9, ContentModel.ASSOC_CONTAINS, QName.createQName("{namespace}ten"), ContentModel.TYPE_FOLDER).getChildRef();
|
||||
|
||||
permissionService.setPermission(new SimplePermissionEntry(rootNodeRef, getPermission(PermissionService.READ), "andy", AccessStatus.ALLOWED));
|
||||
|
@@ -45,7 +45,6 @@ public interface PermissionsDaoComponent
|
||||
/**
|
||||
* Get the permissions that have been set on a given node.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @return the node permission entry
|
||||
*/
|
||||
public NodePermissionEntry getPermissions(NodeRef nodeRef);
|
||||
@@ -60,8 +59,6 @@ public interface PermissionsDaoComponent
|
||||
|
||||
/**
|
||||
* Remove all permissions for the specified authority
|
||||
*
|
||||
* @param authority
|
||||
*/
|
||||
public void deletePermissions(String authority);
|
||||
|
||||
@@ -91,40 +88,27 @@ public interface PermissionsDaoComponent
|
||||
/**
|
||||
* Set a permission on a node. If the node has no permissions set then a default node permission (allowing
|
||||
* inheritance) will be created to contain the permission entry.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @param authority
|
||||
* @param perm
|
||||
* @param allow
|
||||
*/
|
||||
public void setPermission(NodeRef nodeRef, String authority, PermissionReference perm, boolean allow);
|
||||
|
||||
/**
|
||||
* Create a persisted permission entry given and other representation of a permission entry.
|
||||
*
|
||||
* @param permissionEntry
|
||||
*/
|
||||
public void setPermission(PermissionEntry permissionEntry);
|
||||
|
||||
/**
|
||||
* Create a persisted node permission entry given a template object from which to copy.
|
||||
*
|
||||
* @param nodePermissionEntry
|
||||
*/
|
||||
public void setPermission(NodePermissionEntry nodePermissionEntry);
|
||||
|
||||
/**
|
||||
* Set the inheritance behaviour for permissions on a given node.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @param inheritParentPermissions
|
||||
*/
|
||||
public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions);
|
||||
|
||||
/**
|
||||
* Return the inheritance behaviour for permissions on a given node.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @return inheritParentPermissions
|
||||
*/
|
||||
public boolean getInheritParentPermissions(NodeRef nodeRef);
|
||||
@@ -132,7 +116,6 @@ public interface PermissionsDaoComponent
|
||||
/**
|
||||
* Get all the permissions set for the given authority
|
||||
*
|
||||
* @param authority
|
||||
* @return - the permissions set on all nodes for the given authority.
|
||||
*/
|
||||
public Map<NodeRef, Set<AccessPermission>> getAllSetPermissions(String authority);
|
||||
@@ -152,42 +135,28 @@ public interface PermissionsDaoComponent
|
||||
|
||||
/**
|
||||
* Delete entries from a permission mask on a store by authority
|
||||
*
|
||||
* @param storeRef
|
||||
* @param authority
|
||||
*/
|
||||
public void deletePermissions(StoreRef storeRef, String authority);
|
||||
|
||||
/**
|
||||
* Remove part of a permission mask from a store
|
||||
*
|
||||
* @param storeRef
|
||||
* @param authority
|
||||
* @param perm
|
||||
*/
|
||||
public void deletePermission(StoreRef storeRef, String authority, PermissionReference perm);
|
||||
|
||||
/**
|
||||
* Remove all permission masks from a store
|
||||
*
|
||||
* @param storeRef
|
||||
*/
|
||||
public void deletePermissions(StoreRef storeRef);
|
||||
|
||||
/**
|
||||
* Set part of a permission mask on a store.
|
||||
*
|
||||
* @param storeRef
|
||||
* @param authority
|
||||
* @param permission
|
||||
* @param allow
|
||||
*/
|
||||
public void setPermission(StoreRef storeRef, String authority, PermissionReference permission, boolean allow);
|
||||
|
||||
/**
|
||||
* Get permission masks set on a store
|
||||
*
|
||||
* @param storeRef
|
||||
* @return the node permission entry
|
||||
*/
|
||||
public NodePermissionEntry getPermissions(StoreRef storeRef);
|
||||
@@ -195,9 +164,7 @@ public interface PermissionsDaoComponent
|
||||
/**
|
||||
* Get the properties for the access control list
|
||||
*
|
||||
* @param nodeRef
|
||||
* @return the properties for the access control list
|
||||
*/
|
||||
public AccessControlListProperties getAccessControlListProperties(NodeRef nodeRef);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user