Author: ate
Date: Fri Apr 14 12:01:49 2006
New Revision: 394175

URL: http://svn.apache.org/viewcvs?rev=394175&view=rev
Log:
Fixing JS2-503:
Incorrectly passing a UserPrincipal fullpath instead of the name to 
SecurityAccess.getInternalUserPrincipal(String,boolean).
See: http://issues.us.apache.org/jira/browse/JS2-503

Modified:
    
portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java

Modified: 
portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java
URL: 
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java?rev=394175&r1=394174&r2=394175&view=diff
==============================================================================
--- 
portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java
 (original)
+++ 
portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java
 Fri Apr 14 12:01:49 2006
@@ -91,10 +91,9 @@
      */
     public void addUserPrincipal(UserPrincipal userPrincipal) throws 
SecurityException
     {
-        String fullPath = userPrincipal.getFullPath();
-        if ( null == securityAccess.getInternalUserPrincipal(fullPath, false) )
+        if ( null == 
securityAccess.getInternalUserPrincipal(userPrincipal.getName(), false) )
         {
-            securityAccess.setInternalUserPrincipal(new 
InternalUserPrincipalImpl(fullPath), false);        
+            securityAccess.setInternalUserPrincipal(new 
InternalUserPrincipalImpl(userPrincipal.getFullPath()), false);        
         }
         else
         {
@@ -107,8 +106,7 @@
      */
     public void updateUserPrincipal(UserPrincipal userPrincipal) throws 
SecurityException
     {
-        String fullPath = userPrincipal.getFullPath();
-        InternalUserPrincipal internalUser = 
securityAccess.getInternalUserPrincipal(fullPath, false);
+        InternalUserPrincipal internalUser = 
securityAccess.getInternalUserPrincipal(userPrincipal.getName(), false);
         if ( null != internalUser && internalUser.isEnabled() != 
userPrincipal.isEnabled() )
         {
             internalUser.setEnabled(userPrincipal.isEnabled());



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to