resetAllPermissions needed to check for inherited flag

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield 2008-08-22 12:44:47 +00:00
parent f8e72d6b47
commit 07e74b87b2

View File

@ -474,8 +474,13 @@ public class Site implements Serializable
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
// Reset all the permissions on the node // Reset all the permissions on the node
serviceRegistry.getPermissionService().setInheritParentPermissions(nodeRef, true); PermissionService permissionService = serviceRegistry.getPermissionService();
serviceRegistry.getPermissionService().deletePermissions(nodeRef); // Ensure node isn't inheriting permissions from an ancestor
if (!permissionService.getInheritParentPermissions(nodeRef))
{
permissionService.deletePermissions(nodeRef);
permissionService.setInheritParentPermissions(nodeRef, true);
}
return null; return null;
} }