mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2E to HEAD
17533: Fix for unreported issue for events with multiple days (secondary elements) aren't filtered correctly when view is filtered by tags 17535: ETHREEOH-3411 - Alert appears when loading My Dashboard when Documents I'm editing dashlet is aded and site name was edited with XSS text 17536: Fixes for various forms issues (ETHREEOH-3398, ETHREEOH-3273, ETHREEOH-3339 & ALFCOM-3587) and reverted accidentally checked in log4j.properties file - Folders can now have tags applied in edit form - Working copy nodes have their cm:name property set to protected - Removed mandatory marker from checkbox control (if you have a boolean there is always a value so no need to mark as mandatory) - Potential security issue 17537: ETHREEOH-1908 - .docx word documents are not displayed in 'Word Documents' category in 'Document List' component. Also fixed some i18n strings. 17538: Fix for ETHREEOH-3085 and ETHREEOH-3341. - NTLM/Kerberos, Tomcat/JBoss5 and JSF client now play nicely on session timeout and display the correct configured page on first login. - Tested Share NTLM works correctly with above changes. 17539: Fix for ETHREEOH-3368: UI does not show multi-valued MLText propertis as localisable 17543: Merged DEV_TEMPORARY to V3.2 17529: Fix for ETHREEOH-3186 & ETHREEOH-3187 17544: Fix for ETHREEOH-1509 - Manage action is not applied for task resources part from My Tasks tab in Office Addins if user already opens another task. 17547: Fix for ETHREEOH-1709 - AccessDeniedException - Download Servlet not re-directing user to login page. - WebDav path now resolved to a noderef as system user - then the permission test for READ_CONTENT is performed directly on the resulting noderef. 17548: Fix for ETHREEOH-3137 - Tags created for All day event are not displayed in Tags pane. 17551: Final part of fix for ETHREEOH-2161 includes solution for ETHREEOH-3270. - An admin user can now optionally disable the execute of Rules and the Archive of nodes during a folder delete operation. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,6 +39,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.tenant.TenantService;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
@@ -96,8 +98,6 @@ public abstract class BaseServlet extends HttpServlet
|
||||
|
||||
private static Log logger = LogFactory.getLog(BaseServlet.class);
|
||||
|
||||
// Tenant service
|
||||
private static TenantService m_tenantService;
|
||||
|
||||
/**
|
||||
* Return the ServiceRegistry helper instance
|
||||
@@ -309,66 +309,69 @@ public abstract class BaseServlet extends HttpServlet
|
||||
* @param args The elements of the path to lookup
|
||||
* @param decode True to decode the arg from UTF-8 format, false for no decoding
|
||||
*/
|
||||
private static NodeRef resolveWebDAVPath(WebApplicationContext wc, String[] args, boolean decode)
|
||||
private static NodeRef resolveWebDAVPath(final WebApplicationContext wc, final String[] args, final boolean decode)
|
||||
{
|
||||
NodeRef nodeRef = null;
|
||||
return AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
||||
{
|
||||
public NodeRef doWork() throws Exception
|
||||
{
|
||||
NodeRef nodeRef = null;
|
||||
|
||||
List<String> paths = new ArrayList<String>(args.length - 1);
|
||||
|
||||
List<String> paths = new ArrayList<String>(args.length - 1);
|
||||
|
||||
FileInfo file = null;
|
||||
try
|
||||
{
|
||||
// create a list of path elements (decode the URL as we go)
|
||||
for (int x = 1; x < args.length; x++)
|
||||
{
|
||||
paths.add(decode ? URLDecoder.decode(args[x]) : args[x]);
|
||||
FileInfo file = null;
|
||||
try
|
||||
{
|
||||
// create a list of path elements (decode the URL as we go)
|
||||
for (int x = 1; x < args.length; x++)
|
||||
{
|
||||
paths.add(decode ? URLDecoder.decode(args[x]) : args[x]);
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Attempting to resolve webdav path: " + paths);
|
||||
|
||||
// get the company home node to start the search from
|
||||
nodeRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId());
|
||||
|
||||
TenantService tenantService = (TenantService)wc.getBean("tenantService");
|
||||
if (tenantService != null && tenantService.isEnabled())
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("MT is enabled.");
|
||||
|
||||
NodeService nodeService = (NodeService) wc.getBean("NodeService");
|
||||
SearchService searchService = (SearchService) wc.getBean("SearchService");
|
||||
NamespaceService namespaceService = (NamespaceService) wc.getBean("NamespaceService");
|
||||
|
||||
// TODO: since these constants are used more widely than just the WebDAVServlet,
|
||||
// they should be defined somewhere other than in that servlet
|
||||
String rootPath = wc.getServletContext().getInitParameter(org.alfresco.repo.webdav.WebDAVServlet.KEY_ROOT_PATH);
|
||||
|
||||
// note: rootNodeRef is required (for storeRef part)
|
||||
nodeRef = tenantService.getRootNode(nodeService, searchService, namespaceService, rootPath, nodeRef);
|
||||
}
|
||||
|
||||
if (paths.size() != 0)
|
||||
{
|
||||
FileFolderService ffs = (FileFolderService)wc.getBean("FileFolderService");
|
||||
file = ffs.resolveNamePath(nodeRef, paths);
|
||||
nodeRef = file.getNodeRef();
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Resolved webdav path to NodeRef: " + nodeRef);
|
||||
}
|
||||
catch (FileNotFoundException fne)
|
||||
{
|
||||
if (logger.isWarnEnabled())
|
||||
logger.warn("Failed to resolve webdav path", fne);
|
||||
|
||||
nodeRef = null;
|
||||
}
|
||||
return nodeRef;
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Attempting to resolve webdav path: " + paths);
|
||||
|
||||
// get the company home node to start the search from
|
||||
nodeRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId());
|
||||
|
||||
m_tenantService = (TenantService) wc.getBean("tenantService");
|
||||
if (m_tenantService !=null && m_tenantService.isEnabled())
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("MT is enabled.");
|
||||
}
|
||||
|
||||
NodeService nodeService = (NodeService) wc.getBean("NodeService");
|
||||
SearchService searchService = (SearchService) wc.getBean("SearchService");
|
||||
NamespaceService namespaceService = (NamespaceService) wc.getBean("NamespaceService");
|
||||
|
||||
// TODO: since these constants are used more widely than just the WebDAVServlet,
|
||||
// they should be defined somewhere other than in that servlet
|
||||
String m_rootPath = wc.getServletContext().getInitParameter(org.alfresco.repo.webdav.WebDAVServlet.KEY_ROOT_PATH);
|
||||
|
||||
// note: rootNodeRef is required (for storeRef part)
|
||||
nodeRef = m_tenantService.getRootNode(nodeService, searchService, namespaceService, m_rootPath, nodeRef);
|
||||
}
|
||||
|
||||
if (paths.size() != 0)
|
||||
{
|
||||
FileFolderService ffs = (FileFolderService)wc.getBean("FileFolderService");
|
||||
file = ffs.resolveNamePath(nodeRef, paths);
|
||||
nodeRef = file.getNodeRef();
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Resolved webdav path to NodeRef: " + nodeRef);
|
||||
}
|
||||
catch (FileNotFoundException fne)
|
||||
{
|
||||
if (logger.isWarnEnabled())
|
||||
logger.warn("Failed to resolve webdav path", fne);
|
||||
|
||||
nodeRef = null;
|
||||
}
|
||||
|
||||
return nodeRef;
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user