Re: creation of a user in jetspeed which is already in the ldap

David Dyer <[email protected]>
Newsgroups gmane.comp.jakarta.jetspeed.user
Message-ID <[email protected]>
The simple, although possibly risky, way to handle this would be to 
create a portlet functions similarly to the j2-admin user creation 
portlet that simply calls the user manager and checks if the user 
already exists, then branches and if/else condition to the create method 
or the update method.

It's got some inherent risk in that if you do it this way, it has no way 
of determining if you're accidently trying to create a second user with 
the same user name, or if you actually want to update the existing 
jetspeed principal.

The above of course is assuming I understand the nature of your problem 
correctly.

David Dyer
Senior Integration Specialist
Artifact Software Inc
email: [email protected]
skype: ddyer1
phone: 866-970-2435, ext 103.


On 16/11/2011 9:12 AM, [email protected] wrote:
>
> Hello
> I'm working on jetspeed 2.2.1, in ldap mode.
> The creation/desctruction of  an user works fine, but I have a new usecase.
>
> I have an user which already exists in my ldap. (created by another
> application)
> When I use j2admin to create a user with the same id, I have the exception
>
> 2011-11-16 14:59:05,250 [http-8098-13] ERROR
> org.apache.jetspeed.portlets.security.JetspeedPrincipalManagementPortlet -
>
> Failed to update user.
> org.apache.jetspeed.security.SecurityException: The user theUserName
> already exists.
>
> Which is true, basically :-)
>
> My question is: Is it possible to have a mode where when the user exists in
> ldap, the work of creation proceeds without taking account of this error,
> which means that it still create the user in the jetspeed  table: Security
>
> prinicpals and so on?
>
>
> Cordialement,
> -----------------------------------------------
> Jérôme Dupont
> Bibliothèque Nationale de France
> Département des Systèmes d'Information
> Tour T3 - Quai François Mauriac
> 75706 Paris Cedex 13
> téléphone: 33 (0)1 53 79 45 40
> e-mail: [email protected]
> -----------------------------------------------
>
> Exposition  Casanova, la passion de la Liberté  - du 15 novembre 2011 au 19 février 2012 - BnF - François-Mitterrand / Grande Galerie Avant d'imprimer, pensez à l'environnement.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1869 / Virus Database: 2092/4618 - Release Date: 11/15/11
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.