Title: RE: Creation of PSMLs files

I managed to make a complete solution which automatically creates the default PSML if no PSML exists.

It seems to work, with a problem that it gives the user only the "user" role, and the default PSML (by me) includes potlets that a simple user isn't allowed to see. And I think the code is not really elegant, and I didn't test it completely, just tried it once or twice.

I extended the class TurbineAuthentication with my class PcsAuthentication (attached), in order to check if there is a profile for the user, and if there is not, create one, based on the method creatDefaultPSML from the class TurbineUserManagement. It also grants th role "user". Of course a role named "user" has to exist, and this should be extended to maybe add other roles as well.

I'd be interested in any feed back to this class. Hope it helps somebody.

Pierre

> -----Original Message-----
> From: Aurelien Pernoud [mailto:[EMAIL PROTECTED]]
> Sent: mardi, 26. novembre 2002 15:26
> To: 'Jetspeed Users List'
> Subject: RE: Creation of PSMLs files
>
>
>
> > -----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: PcsAuthentication.java
Description: Binary data

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


Reply via email to