I try to merge jetspeed into an existing system. The problem I have is
that I have an existing system with a user management and try to add a
jetspeed user every time a user in the existing JSP system is created.

I basically figured it out already:

from my external JSP/Servlet I have to call following:

   JetspeedUser jsUser = JetspeedSecurity.getUserInstance();

          String userName = (String)obj.get_clogin();
                        
jsUser.setUserName(JetspeedSecurity.convertUserName((String)obj.get_clogin()));
          jsUser.setPassword((String)obj.get_cpwd());

          jsUser.setFirstName((String)obj.get_cvorname());
          jsUser.setLastName((String)obj.get_cnachname());

          Date now = new Date();

          jsUser.setCreateDate(now);
          jsUser.setLastLogin(now);
          jsUser.setConfirmed(JetspeedResources.CONFIRM_VALUE);




          String data = obj.get_cemail();
          if ((data == null)||(data.trim().equals(""))) data = "";

          jsUser.setEmail(data);

          jsUser.setDisabled(false);



          JetspeedSecurity.addUser(jsUser);
          jsUser = JetspeedSecurity.getUser(userName);
          JetspeedSecurity.saveUser(jsUser);



The problem however is, the user is created, so far all the access
rights work, but strangely the system doesn´t react as it should. After
creation I log into my new user and the user itself is recognized,
however the page not:

aka, when I link dynamically to this user I just get following link:

http://localhost:8080/jetspeed/portal/role/user/page/

However querying the user in the context gives back the correct username

Also the user itself does exist, but following code working on jetspeed
generated users doesn´t work on externally generated users:

$jslink.setTemplate(mytemplate)

should generate:

http://localhost:8080/jetspeed/portal/user/myuser/page.....

instead it generates on externally generated users:

http://localhost:8080/jetspeed/portal/role/user/page/

So basically what happens is that the authentication works
the display of the username as well and also can be referenced if
accessed directly via a hand entered url

The user also exists and it shows itself correctly in the admin console

But $jslink.setTemplate simply puts out bogus data regarding the user
instead of putting out correct data as it happens if the user is
generated via the admin console.

To sum it up I need  expert help. I´m not really sure what is going
wrong there.

Thanks for your help

Werner Punz




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

Reply via email to