ALF-16257: CIFS: Collaborator/editor could not edit file on Mac Os Mountain Lion

For DoubleRenameShuffle scenario for Mac Lion files add moveAsSystem flag to allow Editor to edit files. Add unit tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55130 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Pavel Yurke
2013-09-09 12:41:13 +00:00
parent a1fefd64ef
commit 338ededcb8
10 changed files with 561 additions and 55 deletions

View File

@@ -18,8 +18,6 @@
*/
package org.alfresco.filesys.repo.rules.commands;
import java.util.List;
import org.alfresco.filesys.repo.rules.Command;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport.TxnReadState;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -32,6 +30,7 @@ public class MoveFileCommand implements Command
private NodeRef rootNode;
private String fromPath;
private String toPath;
private boolean isMoveAsSystem = false;
public MoveFileCommand(String from, String to, NodeRef rootNode, String fromPath, String toPath)
{
@@ -42,7 +41,13 @@ public class MoveFileCommand implements Command
this.toPath = toPath;
}
// ALF-16257: in shuffle scenarios if user has insufficient permissions rename should be done as System
public MoveFileCommand(String from, String to, NodeRef rootNode, String fromPath, String toPath, boolean moveAsSystem)
{
this(from, to, rootNode, fromPath, toPath);
this.isMoveAsSystem = moveAsSystem;
}
public String getFrom()
{
return from;
@@ -95,4 +100,9 @@ public class MoveFileCommand implements Command
{
return toPath;
}
public boolean isMoveAsSystem()
{
return isMoveAsSystem;
}
}