mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-19592 "Intermittent 403 in CMIS Calls"
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54589 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,7 +37,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
import net.sf.acegisecurity.Authentication;
|
import net.sf.acegisecurity.Authentication;
|
||||||
|
|
||||||
import org.alfresco.cmis.CMISDictionaryModel;
|
|
||||||
import org.alfresco.cmis.CMISInvalidArgumentException;
|
import org.alfresco.cmis.CMISInvalidArgumentException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.opencmis.dictionary.CMISNodeInfo;
|
import org.alfresco.opencmis.dictionary.CMISNodeInfo;
|
||||||
@@ -168,11 +167,7 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
|||||||
@Override
|
@Override
|
||||||
public void open(CallContext context)
|
public void open(CallContext context)
|
||||||
{
|
{
|
||||||
CallContext ctx = getContext();
|
AlfrescoCmisServiceCall.set(context);
|
||||||
if(ctx == null)
|
|
||||||
{
|
|
||||||
AlfrescoCmisServiceCall.set(context);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected CallContext getContext()
|
protected CallContext getContext()
|
||||||
@@ -184,7 +179,7 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
|||||||
@Override
|
@Override
|
||||||
public void close()
|
public void close()
|
||||||
{
|
{
|
||||||
AlfrescoCmisServiceCall.clear();
|
AlfrescoCmisServiceCall.clear();
|
||||||
|
|
||||||
// Put these resources on the transactions
|
// Put these resources on the transactions
|
||||||
nodeInfoMap.clear();
|
nodeInfoMap.clear();
|
||||||
@@ -492,7 +487,7 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
|||||||
// create a child CMIS object
|
// create a child CMIS object
|
||||||
CMISNodeInfo ni = createNodeInfo(child.getNodeRef());
|
CMISNodeInfo ni = createNodeInfo(child.getNodeRef());
|
||||||
|
|
||||||
if (getObjectInfo(repositoryId, ni.getObjectId())==null)
|
if (getObjectInfo(repositoryId, ni.getObjectId(), includeRelationships)==null)
|
||||||
{
|
{
|
||||||
// ignore invalid children
|
// ignore invalid children
|
||||||
continue;
|
continue;
|
||||||
@@ -1061,7 +1056,8 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
|||||||
|
|
||||||
connector.getActivityPoster().postFileFolderAdded(nodeRef);
|
connector.getActivityPoster().postFileFolderAdded(nodeRef);
|
||||||
|
|
||||||
return nodeRef.getId();
|
String objectId = connector.createObjectId(nodeRef);
|
||||||
|
return objectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String parseMimeType(ContentStream contentStream)
|
private String parseMimeType(ContentStream contentStream)
|
||||||
|
@@ -83,7 +83,10 @@ public class AlfrescoCmisServiceInterceptor implements MethodInterceptor
|
|||||||
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
|
" Effective auth: " + AuthenticationUtil.getRunAsUser() + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
service.beforeCall();
|
if(!methodName.equalsIgnoreCase("close"))
|
||||||
|
{
|
||||||
|
service.beforeCall();
|
||||||
|
}
|
||||||
|
|
||||||
if(debug || trace)
|
if(debug || trace)
|
||||||
{
|
{
|
||||||
@@ -101,7 +104,10 @@ public class AlfrescoCmisServiceInterceptor implements MethodInterceptor
|
|||||||
{
|
{
|
||||||
FileFilterMode.clearClient();
|
FileFilterMode.clearClient();
|
||||||
|
|
||||||
service.afterCall();
|
if(!methodName.equalsIgnoreCase("close"))
|
||||||
|
{
|
||||||
|
service.afterCall();
|
||||||
|
}
|
||||||
|
|
||||||
if(debug || trace)
|
if(debug || trace)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user