mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V1.3 to HEAD (3235:3239, 3240:3246)
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3235 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3239 . svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3240 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3246 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3410 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -444,13 +444,15 @@ public class CopyServiceImpl implements CopyService
|
|||||||
* @param destinationNodeRef the destination node reference
|
* @param destinationNodeRef the destination node reference
|
||||||
*/
|
*/
|
||||||
private void copyPermissions(NodeRef sourceNodeRef, NodeRef destinationNodeRef)
|
private void copyPermissions(NodeRef sourceNodeRef, NodeRef destinationNodeRef)
|
||||||
|
{
|
||||||
|
if(this.permissionService.hasPermission(sourceNodeRef, PermissionService.READ_PERMISSIONS) == AccessStatus.ALLOWED)
|
||||||
{
|
{
|
||||||
// Get the permission details of the source node reference
|
// Get the permission details of the source node reference
|
||||||
Set<AccessPermission> permissions = this.permissionService.getAllSetPermissions(sourceNodeRef);
|
Set<AccessPermission> permissions = this.permissionService.getAllSetPermissions(sourceNodeRef);
|
||||||
boolean includeInherited = this.permissionService.getInheritParentPermissions(sourceNodeRef);
|
boolean includeInherited = this.permissionService.getInheritParentPermissions(sourceNodeRef);
|
||||||
|
|
||||||
AccessStatus writePermission = permissionService.hasPermission(destinationNodeRef, PermissionService.CHANGE_PERMISSIONS);
|
AccessStatus writePermission = permissionService.hasPermission(destinationNodeRef, PermissionService.CHANGE_PERMISSIONS);
|
||||||
if (this.authenticationService.isCurrentUserTheSystemUser() || writePermission.equals(AccessStatus.ALLOWED))
|
if (writePermission.equals(AccessStatus.ALLOWED) || this.authenticationService.isCurrentUserTheSystemUser() )
|
||||||
{
|
{
|
||||||
// Set the permission values on the destination node
|
// Set the permission values on the destination node
|
||||||
for (AccessPermission permission : permissions)
|
for (AccessPermission permission : permissions)
|
||||||
@@ -464,6 +466,7 @@ public class CopyServiceImpl implements CopyService
|
|||||||
this.permissionService.setInheritParentPermissions(destinationNodeRef, includeInherited);
|
this.permissionService.setInheritParentPermissions(destinationNodeRef, includeInherited);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the copy details. This calls the appropriate policies that have been registered
|
* Gets the copy details. This calls the appropriate policies that have been registered
|
||||||
|
Reference in New Issue
Block a user