From 954766724fbed80866eadb4d2a594a71bac03eb2 Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Mon, 23 Mar 2009 15:58:56 +0000 Subject: [PATCH] Enable cold bootstrap without waking up authentication component. Made ImporterComponent use AuthenticationContext rather than AuthenticationService. Was then able to roll back temporary fix to AuthenticationFilter (from 13673). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13727 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/web/app/servlet/AuthenticationFilter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/web/app/servlet/AuthenticationFilter.java b/source/java/org/alfresco/web/app/servlet/AuthenticationFilter.java index 4c6de56365..35cfb0529e 100644 --- a/source/java/org/alfresco/web/app/servlet/AuthenticationFilter.java +++ b/source/java/org/alfresco/web/app/servlet/AuthenticationFilter.java @@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse; import org.alfresco.config.ConfigService; import org.alfresco.repo.web.filter.beans.DependencyInjectedFilter; import org.alfresco.web.config.ClientConfigElement; +import org.springframework.beans.factory.InitializingBean; /** * @author Kevin Roast @@ -50,7 +51,7 @@ import org.alfresco.web.config.ClientConfigElement; * Note that this filter is only active when the system is running in a servlet container - * the AlfrescoFacesPortlet will be used for a JSR-168 Portal environment. */ -public class AuthenticationFilter implements DependencyInjectedFilter +public class AuthenticationFilter implements DependencyInjectedFilter, InitializingBean { private String loginPage; @@ -65,7 +66,7 @@ public class AuthenticationFilter implements DependencyInjectedFilter this.configService = configService; } - public synchronized String getLoginPage() + public void afterPropertiesSet() throws Exception { if (this.loginPage == null) { @@ -77,7 +78,6 @@ public class AuthenticationFilter implements DependencyInjectedFilter this.loginPage = clientConfig.getLoginPage(); } } - return this.loginPage; } public void doFilter(ServletContext context, ServletRequest req, ServletResponse res, FilterChain chain) @@ -87,7 +87,7 @@ public class AuthenticationFilter implements DependencyInjectedFilter HttpServletResponse httpRes = (HttpServletResponse) res; // allow the login page to proceed - if (!httpReq.getRequestURI().endsWith(getLoginPage())) + if (!httpReq.getRequestURI().endsWith(this.loginPage)) { AuthenticationStatus status = AuthenticationHelper.authenticate(context, httpReq, httpRes, false);