> -----Message d'origine-----
> De : Pierre Henry [mailto:[EMAIL PROTECTED]]
>
> Aurelien, that's just what I want to do.
>
> I see from the TurbieUM.addDefaultPSML how to create a new
> PSML for a user,
> but how would you suggest that I test if PSML exists for this user ?

I wanted to try that later, but I tried it now then :)

Here's something that seems to work not so bad, if you have a TURBINE_USER
but no profile associated.
I didn't had group or role to this user, so the test may be incomplete but
not far from solution... :

I made my own login (change the JS.PR default one), attached with this mail

Here's what it does correctly :

user does not exist : Prints "User unknown"
user exists and has a PSML : Prints "Everything is ok, let's login" (tried
it with admin, turbine, anon)
user exists in TURBINE_USER but has no PSML : Prints "No Profile Found"
(had it manually in database, only in table turbine_user)

Although here i didn't test the password supply (JetspeedSecurity has other
methods, I took the shortest !), and I'm not sure it's the right way to do
this, but it seems to work... If any dev have comments I'll take them ;)

Hope this helps,
Aurelien

PS : If you manage to do something working with only a turbine_user (or
maybe turbine_user created and its roles associated in
turbine_user_group_role), I'd be very interested for the future :)

Attachment: MyLogin.java
Description: JavaScript source

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

Reply via email to