mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
16444: Fix ETHREEOH-2767 - regress: cannot login to MT Share, also fix unreported MT issue with site dashboards 16671: (record-only) Merged V3.1 to V3.2 (record-only - already resolved) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16900 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -167,7 +167,20 @@ public class WebClientPortletAuthenticatorFactory implements PortletAuthenticato
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.alfresco.web.scripts.Authenticator#emptyCredentials()
|
||||||
|
*/
|
||||||
|
public boolean emptyCredentials()
|
||||||
|
{
|
||||||
|
String portalUser = (String)req.getPortletSession().getAttribute(WebScriptPortletRequest.ALFPORTLETUSERNAME);
|
||||||
|
if (portalUser == null)
|
||||||
|
{
|
||||||
|
portalUser = req.getRemoteUser();
|
||||||
|
}
|
||||||
|
return (portalUser == null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper. Remove Web Client session invalidated flag
|
* Helper. Remove Web Client session invalidated flag
|
||||||
*
|
*
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -86,6 +86,8 @@ public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactor
|
|||||||
private WebScriptServletRequest servletReq;
|
private WebScriptServletRequest servletReq;
|
||||||
private WebScriptServletResponse servletRes;
|
private WebScriptServletResponse servletRes;
|
||||||
|
|
||||||
|
private String ticket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct
|
* Construct
|
||||||
*
|
*
|
||||||
@@ -97,6 +99,8 @@ public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactor
|
|||||||
{
|
{
|
||||||
this.servletReq = req;
|
this.servletReq = req;
|
||||||
this.servletRes = res;
|
this.servletRes = res;
|
||||||
|
|
||||||
|
this.ticket = req.getParameter("ticket");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -113,14 +117,14 @@ public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactor
|
|||||||
//
|
//
|
||||||
HttpServletRequest req = servletReq.getHttpServletRequest();
|
HttpServletRequest req = servletReq.getHttpServletRequest();
|
||||||
HttpServletResponse res = servletRes.getHttpServletResponse();
|
HttpServletResponse res = servletRes.getHttpServletResponse();
|
||||||
String ticket = req.getParameter("ticket");
|
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Alfresco ticket provided: " + (ticket != null && ticket.length() > 0));
|
logger.debug("Alfresco ticket provided: " + (ticket != null && ticket.length() > 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ticket != null && ticket.length() > 0)
|
if (! emptyCredentials())
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("Authenticating ticket " + ticket);
|
logger.debug("Authenticating ticket " + ticket);
|
||||||
@@ -164,6 +168,14 @@ public class WebClientAuthenticatorFactory implements ServletAuthenticatorFactor
|
|||||||
|
|
||||||
return !(status == null || status == AuthenticationStatus.Failure);
|
return !(status == null || status == AuthenticationStatus.Failure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.alfresco.web.scripts.Authenticator#emptyCredentials()
|
||||||
|
*/
|
||||||
|
public boolean emptyCredentials()
|
||||||
|
{
|
||||||
|
return (ticket == null || ticket.length() == 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user