UserManager's setUserEnabled() method fails after creating new users
--------------------------------------------------------------------

         Key: JS2-503
         URL: http://issues.apache.org/jira/browse/JS2-503
     Project: Jetspeed 2
        Type: Bug
  Components: Security  
    Versions: 2.0-FINAL    
 Environment: Windows XP
    Reporter: Grant Gochnauer


If I create a new user using the Admin component

(_portalAdmin.registerUser(user.getEmailAddress(), user.getPassword(), 
user.getRoles(), user.getGroups(), null, profilingRules, null);

and then call the UserManager's setUserEnabled method, it will fail because it 
cannot find the user

(_userManager.setUserEnabled(user.getEmailAddress(), false);)

I stepped through the source code and it appears that in the method:

org.apache.jetspeed.security.spi.impl.DefaultUserSecurityHander.updateUserPrincipal(UserPrincipal
 userPrincipal) is calling

InternalUserPrincipal internalUser = 
securityAccess.getInternalUserPrincipal(fullPath, false); which instead of a 
fullpath needs to be passed a username instead. So what happens is that it 
tries to find a user with "/user/[EMAIL PROTECTED]/com" instead of "[EMAIL 
PROTECTED]/com".

I have confirmed that after calling the registerUser method, the user does 
exist in the database and there is no reason that the InternalUserPrincipal 
object should be coming back null in the updateUserPrincipal method described 
above.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to