mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13084: Merged V2.1-A to V3.1 7984: *RECORD-ONLY* Final part of fix for ACT 819, by default the web-client now generates WebScript content download API based URLs to allow relative paths to be resolved in HTML content files 13086: Merged V2.1-A to V3.1 7986: *RECORD-ONLY* Additional for ACT 819, View In Browser details page links and cm:link objects to content now output Content API webscript urls 13090: Merged V2.1-A to V3.1 7986: Language locale auto-selection based on browser locale - see ACT 1053 NOTE: a web-client-config setting has been added to enable this - it is off by default. 13093: Merged V2.1-A to V3.1 8255: Filetypes and PanelGenerator enhancements 13094: Merged V2.1-A to V3.1 8547: Branding changes from Mike [just filetypes merged] 13095: Merged V2.1-A to V3.1 8555: Webdav path support for ExternalAccessServlet browse navigation 13103: Merged V2.1-A to V3.1 8592: Fix for login page issue with language locale auto-selection - see ACT 1053 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13559 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ package org.alfresco.web.app.servlet;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.portlet.PortletSession;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.Cookie;
|
||||
@@ -50,6 +51,7 @@ import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.LoginBean;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -180,9 +182,17 @@ public final class AuthenticationHelper
|
||||
// store the User object in the Session - the authentication servlet will then proceed
|
||||
session.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);
|
||||
|
||||
// Set the current locale
|
||||
FacesHelper.getFacesContext(req, res, sc);
|
||||
I18NUtil.setLocale(Application.getLanguage(req.getSession()));
|
||||
// Set the current locale and language
|
||||
FacesContext fc = FacesHelper.getFacesContext(req, res, sc);
|
||||
if (Application.getClientConfig(fc).isLanguageSelect())
|
||||
{
|
||||
I18NUtil.setLocale(Application.getLanguage(req.getSession()));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the current thread locale (also for JSF context)
|
||||
fc.getViewRoot().setLocale(BaseServlet.setLanguageFromRequestHeader(req));
|
||||
}
|
||||
|
||||
// remove the session invalidated flag
|
||||
session.removeAttribute(AuthenticationHelper.SESSION_INVALIDATED);
|
||||
@@ -240,10 +250,18 @@ public final class AuthenticationHelper
|
||||
}
|
||||
|
||||
// setup faces context
|
||||
FacesHelper.getFacesContext(req, res, sc);
|
||||
FacesContext fc = FacesHelper.getFacesContext(req, res, sc);
|
||||
|
||||
// Set the current locale
|
||||
I18NUtil.setLocale(Application.getLanguage(req.getSession()));
|
||||
// Set the current locale and language
|
||||
if (Application.getClientConfig(fc).isLanguageSelect())
|
||||
{
|
||||
I18NUtil.setLocale(Application.getLanguage(req.getSession()));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the current thread locale (also for JSF context)
|
||||
fc.getViewRoot().setLocale(BaseServlet.setLanguageFromRequestHeader(req));
|
||||
}
|
||||
|
||||
if (loginBean != null && (loginBean.getUserPreferencesBean() != null))
|
||||
{
|
||||
@@ -331,8 +349,18 @@ public final class AuthenticationHelper
|
||||
}
|
||||
|
||||
// Set the current locale
|
||||
FacesHelper.getFacesContext(httpRequest, httpResponse, context);
|
||||
I18NUtil.setLocale(Application.getLanguage(httpRequest.getSession()));
|
||||
FacesContext fc = FacesHelper.getFacesContext(httpRequest, httpResponse, context);
|
||||
|
||||
// Set the current locale and language
|
||||
if (Application.getClientConfig(fc).isLanguageSelect())
|
||||
{
|
||||
I18NUtil.setLocale(Application.getLanguage(httpRequest.getSession()));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the current thread locale (also for JSF context)
|
||||
fc.getViewRoot().setLocale(BaseServlet.setLanguageFromRequestHeader(httpRequest));
|
||||
}
|
||||
|
||||
return AuthenticationStatus.Success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user