From ed947e5a983b08df739747585db48ad18b829e32 Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Sat, 31 Jan 2015 09:43:05 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud) 86193: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 86111: Merged DEV to V4.2-BUG-FIX (4.2.4) 86029 : MNT-12463 : logout button is displayed in Share (and in Explorer) when 'external' authentication is used/context.externalAuthentication not taken into account - Logout button is will be displayed if logged not a guest and not used 'external' authentication. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94524 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/web/bean/LoginBean.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/java/org/alfresco/web/bean/LoginBean.java b/source/java/org/alfresco/web/bean/LoginBean.java index 98bf59f141..7f98939dda 100644 --- a/source/java/org/alfresco/web/bean/LoginBean.java +++ b/source/java/org/alfresco/web/bean/LoginBean.java @@ -52,6 +52,7 @@ import org.alfresco.web.ui.common.PanelGenerator; import org.alfresco.web.ui.common.Utils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.extensions.surf.site.AuthenticationUtil; /** * JSF Managed Bean. Backs the "login.jsp" view to provide the form fields used @@ -496,6 +497,10 @@ public class LoginBean implements Serializable return outcome; } + public boolean getIsExternalAuthentication(){ + HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); + return AuthenticationUtil.isExternalAuthentication(request); + } // ------------------------------------------------------------------------------ // Private data