Fix for ALF-16837 CMIS allowable actions show incorrectly for working copy and checked out doc

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43684 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2012-11-19 10:13:30 +00:00
parent 0c68a8910f
commit 6ffe457f8f

View File

@@ -57,10 +57,21 @@ public class CurrentVersionEvaluator extends AbstractActionEvaluator
public boolean isAllowed(CMISNodeInfo nodeInfo)
{
if (!nodeInfo.isCurrentVersion())
if(nodeInfo.hasPWC())
{
return nonCurrentVersionValue;
if(!nodeInfo.isPWC())
{
return nonCurrentVersionValue;
}
}
else
{
if (!nodeInfo.isCurrentVersion())
{
return nonCurrentVersionValue;
}
}
return currentVersionEvaluator == null ? currentVersionValue : currentVersionEvaluator.isAllowed(nodeInfo);
}