mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Fix for ALF-10826
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32797 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -222,7 +222,7 @@ var Filters =
|
||||
default: // "path"
|
||||
filterParams.variablePath = false;
|
||||
filterQuery = "+PATH:\"" + parsedArgs.pathNode.qnamePath + "/*\"";
|
||||
filterParams.query = filterQuery + " AND NOT ASPECT:\"sys:hidden\" " + filterQueryDefaults;
|
||||
filterParams.query = filterQuery + filterQueryDefaults;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -482,6 +482,7 @@
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
<property name="siteService" ref="SiteService" />
|
||||
<property name="hiddenAspect" ref="hiddenAspect" />
|
||||
</bean>
|
||||
<bean id="webscript.org.alfresco.repository.store.remoteadm.post" class="org.alfresco.repo.web.scripts.bean.ADMRemoteStore" parent="webscript">
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
@@ -490,6 +491,7 @@
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
<property name="siteService" ref="SiteService" />
|
||||
<property name="hiddenAspect" ref="hiddenAspect" />
|
||||
</bean>
|
||||
<bean id="webscript.org.alfresco.repository.store.remoteadm.delete" class="org.alfresco.repo.web.scripts.bean.ADMRemoteStore" parent="webscript">
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
@@ -498,6 +500,7 @@
|
||||
<property name="fileFolderService" ref="FileFolderService"/>
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
<property name="siteService" ref="SiteService" />
|
||||
<property name="hiddenAspect" ref="hiddenAspect" />
|
||||
</bean>
|
||||
|
||||
|
||||
|
@@ -36,6 +36,7 @@ import org.alfresco.query.CannedQueryPageDetails;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.model.filefolder.HiddenAspect;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
@@ -96,6 +97,7 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
private NamespaceService namespaceService;
|
||||
private SiteService siteService;
|
||||
private ContentService contentService;
|
||||
private HiddenAspect hiddenAspect;
|
||||
|
||||
|
||||
/**
|
||||
@@ -145,6 +147,11 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
{
|
||||
this.contentService = contentService;
|
||||
}
|
||||
|
||||
public void setHiddenAspect(HiddenAspect hiddenAspect)
|
||||
{
|
||||
this.hiddenAspect = hiddenAspect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last modified timestamp for the document.
|
||||
@@ -354,9 +361,7 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
}
|
||||
FileInfo fileInfo = fileFolderService.create(
|
||||
parentFolder.getNodeRef(), encpath.substring(off + 1), ContentModel.TYPE_CONTENT);
|
||||
Map<QName, Serializable> aspectProperties = new HashMap<QName, Serializable>(1, 1.0f);
|
||||
aspectProperties.put(ContentModel.PROP_IS_INDEXED, false);
|
||||
nodeService.addAspect(fileInfo.getNodeRef(), ContentModel.ASPECT_INDEX_CONTROL, aspectProperties);
|
||||
|
||||
contentService.getWriter(
|
||||
fileInfo.getNodeRef(), ContentModel.PROP_CONTENT, true).putContent(content);
|
||||
if (logger.isDebugEnabled())
|
||||
@@ -787,6 +792,10 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
properties.put(ContentModel.PROP_NAME, (Serializable) SURF_CONFIG);
|
||||
ChildAssociationRef ref = this.unprotNodeService.createNode(
|
||||
rootRef, ContentModel.ASSOC_CONTAINS, assocQName, ContentModel.TYPE_FOLDER, properties);
|
||||
|
||||
// surf-config needs to be hidden
|
||||
hiddenAspect.hideNode(ref.getChildRef());
|
||||
|
||||
surfConfigRef = ref.getChildRef();
|
||||
Map<QName, Serializable> aspectProperties = new HashMap<QName, Serializable>(1, 1.0f);
|
||||
aspectProperties.put(ContentModel.PROP_IS_INDEXED, false);
|
||||
@@ -794,7 +803,7 @@ public class ADMRemoteStore extends BaseRemoteStore
|
||||
}
|
||||
return surfConfigRef;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the Sites folder root node reference
|
||||
*/
|
||||
|
@@ -22,7 +22,6 @@ import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
@@ -32,7 +31,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.jlan.server.FileFilterMode;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationContext;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
@@ -43,6 +41,8 @@ import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.FileFilterMode;
|
||||
import org.alfresco.util.FileFilterMode.Client;
|
||||
import org.alfresco.util.PropertyCheck;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -97,7 +97,7 @@ public class WebDAVServlet extends HttpServlet
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
FileFilterMode.Mode mode = FileFilterMode.setMode(FileFilterMode.Mode.ENHANCED);
|
||||
FileFilterMode.setClient(Client.webdav);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -187,8 +187,8 @@ public class WebDAVServlet extends HttpServlet
|
||||
{
|
||||
logger.info(request.getMethod() + " took " + (System.currentTimeMillis()-startTime) + "ms to execute ["+request.getRequestURI()+"]");
|
||||
}
|
||||
|
||||
FileFilterMode.setMode(mode);
|
||||
|
||||
FileFilterMode.clearClient();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user