Merged V3.0 to HEAD

11849: Code/doc clean-up
   11850: Show Folders and Simple View buttons not showing correct caption for overridden default
   11851: DocLib "move" action needs delete permission
   11852: ETHREEOH-662 Incorrect display of 'Invite', 'Edit Site Details', 'Customize Site', 'Customize Dashboard' buttons group in several cases
   11855: Removal of obsolete PageRenderer source and config
   11856: Log4j added to classpath for Eclipse project build (for recent NTLM filter logging changes)
   11857: Added logging settings for various useful connector/ntlm classes
   11858: Fixed the passthru authentication logic when a domain name is not specified by the client. The first passthru server that does not have a domain name set will be used.
   11868: Output errors message(s) when the Share URL is configured incorrectly
   11871: Removed file checked in accidentally, this is generated by continuous build
   11872: Changed the WebDAV user object session attribute so that it does not clash with the web-client user attribute. The WebDAV user object is not derived from the User object that the web-client uses.
   11874: Fixed ETHREEOH-732: Enabling benchmark-override-context.xml leads to ClassNotFoundException
   11875: Fixed ETHREEOH-733: Spring jar missing benchmark remote client

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12484 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-12-18 12:06:12 +00:00
parent ae92254069
commit 420fd61267
4 changed files with 39 additions and 5 deletions

View File

@@ -79,6 +79,10 @@ public abstract class BaseSSOAuthenticationFilter implements Filter
protected static final String NO_AUTH_REQUIRED = "alfNoAuthRequired";
// Attribute used by WebDAV filters for storing the WebDAV user details
protected static final String WEBDAV_AUTH_USER = "_alfDAVAuthTicket";
// Allow an authenitcation ticket to be passed as part of a request to bypass authentication
private static final String ARG_TICKET = "ticket";
@@ -115,6 +119,10 @@ public abstract class BaseSSOAuthenticationFilter implements Filter
private boolean m_ticketLogons;
// User object attribute name
private String m_userAttributeName = AUTHENTICATION_USER;
/**
* Initialize the filter
*
@@ -236,7 +244,27 @@ public abstract class BaseSSOAuthenticationFilter implements Filter
*/
protected SessionUser getSessionUser(HttpSession session)
{
return (SessionUser)session.getAttribute( AUTHENTICATION_USER);
return (SessionUser)session.getAttribute( getUserAttributeName());
}
/**
* Return the user object session attribute name
*
* @return String
*/
protected final String getUserAttributeName()
{
return m_userAttributeName;
}
/**
* Set the user object attribute name
*
* @param userAttr String
*/
protected final void setUserAttributeName( String userAttr)
{
m_userAttributeName = userAttr;
}
/**
@@ -313,7 +341,7 @@ public abstract class BaseSSOAuthenticationFilter implements Filter
// Store the user on the session
session.setAttribute( AUTHENTICATION_USER, user);
session.setAttribute( getUserAttributeName(), user);
session.setAttribute( LOGIN_EXTERNAL_AUTH, Boolean.TRUE);
return user;
@@ -442,7 +470,7 @@ public abstract class BaseSSOAuthenticationFilter implements Filter
// Store the User object in the Session - the authentication servlet will then proceed
req.getSession().setAttribute(AUTHENTICATION_USER, user);
req.getSession().setAttribute( getUserAttributeName(), user);
}
// Indicate the ticket parameter was specified, and valid

View File

@@ -63,6 +63,10 @@ public class KerberosAuthenticationFilter extends BaseKerberosAuthenticationFilt
// Enable ticket based logons
setTicketLogons( true);
// Use the WebDAV specific attribute to store the user details
setUserAttributeName( WEBDAV_AUTH_USER);
}
/* (non-Javadoc)

View File

@@ -60,6 +60,10 @@ public class NTLMAuthenticationFilter extends BaseNTLMAuthenticationFilter
// Enable ticket based logons
setTicketLogons( true);
// Use the WebDAV specific attribute to store the user details
setUserAttributeName( WEBDAV_AUTH_USER);
}
/* (non-Javadoc)

View File

@@ -25,8 +25,6 @@
package org.alfresco.repo.webdav.auth;
import java.io.Serializable;
import org.alfresco.repo.SessionUser;
import org.alfresco.service.cmr.repository.NodeRef;