Author: ajaquith
Date: Wed May 14 12:56:02 2008
New Revision: 656385
URL: http://svn.apache.org/viewvc?rev=656385&view=rev
Log:
The sort-of-secret "share container user accounts with JDBCUserDatabase" option
has been permanently removed, and will not be replaced. This was previously
added to make it easier for users to add themselves to JDBC-based container
realms. However, the switch to salted passwords precludes the continued use of
this option. So it's gone and won't come back.
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/UserManager.java
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/UserManager.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/UserManager.java?rev=656385&r1=656384&r2=656385&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/UserManager.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/UserManager.java Wed May
14 12:56:02 2008
@@ -83,8 +83,8 @@
// private static final String PROP_ACLMANAGER = "jspwiki.aclManager";
- /** Associateds wiki sessions with profiles */
- private final Map m_profiles = new WeakHashMap();
+ /** Associates wiki sessions with profiles */
+ private final Map<WikiSession,UserProfile> m_profiles = new
WeakHashMap<WikiSession,UserProfile>();
/** The user database loads, manages and persists user identities */
private UserDatabase m_database;
@@ -205,7 +205,7 @@
public final UserProfile getUserProfile( WikiSession session )
{
// Look up cached user profile
- UserProfile profile = (UserProfile)m_profiles.get( session );
+ UserProfile profile = m_profiles.get( session );
boolean newProfile = profile == null;
Principal user = null;
@@ -481,11 +481,9 @@
// Query the SpamFilter first
//
- List ls = m_engine.getFilterManager().getFilterList();
- for( Iterator i = ls.iterator(); i.hasNext(); )
+ List<PageFilter> ls =
(List<PageFilter>)m_engine.getFilterManager().getFilterList();
+ for( PageFilter pf : ls )
{
- PageFilter pf = (PageFilter)i.next();
-
if( pf instanceof SpamFilter )
{
if( ((SpamFilter)pf).isValidUserProfile( context, profile ) ==
false )
@@ -498,10 +496,8 @@
}
// If container-managed auth and user not logged in, throw an error
- // unless we're allowed to add profiles to the container
if ( m_engine.getAuthenticationManager().isContainerAuthenticated()
- && !context.getWikiSession().isAuthenticated()
- && !getUserDatabase().isSharedWithContainer() )
+ && !context.getWikiSession().isAuthenticated() )
{
session.addMessage( SESSION_MESSAGES,
rb.getString("security.error.createprofilebeforelogin") );
}