Create user programmatically

Description
cschulz
Posts: 9
Joined: Tue Nov 22, 2011 2:29 pm

Create user programmatically

Postby cschulz » Tue Nov 22, 2011 2:51 pm

Hello,

I am trying to create user programmatically. I searched the Java API, but I can't find anything.
The ProjectWebservice offers the method createUser, but there is no possibility to set a password.
Is there any possibility to create user?

Thanks for any advices.

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: Create user programmatically

Postby NickEntin » Thu Dec 01, 2011 7:38 am

Hi,

I believe something like that is not really implemented in Polarion - customers typically are very careful about users because of licenses and bulk creation of users is not considered scenario so far.

What do you like to achieve at the end?

E.g. LDAP integration of Polarion + User Autocreation allows you to configure Polarion the way that any authenticated user will be automatically created in the system with preconfigured roles/permissions.
To cover this scenario you need to program how to create this user in Apache, LDAP or any other authentication mechanism you use with Polarion.

Please note that the "semantic" user in Polarion (i.e. you can use his name in Assignee or similar fields) will be created only after successfull login attempt, and not right after insertion of an entry in Apache/LDAP.

Best regards,
Nick

cschulz
Posts: 9
Joined: Tue Nov 22, 2011 2:29 pm

Re: Create user programmatically

Postby cschulz » Thu Dec 01, 2011 8:20 am

It's a pity, that there is no way with the API to create user.
The most easiest way to create user is to create the userfolder in user-management/users and add the roles in file security/user-roles.xml.
After that the user is created. For login you have to add the user to the specified files like passwd and access.

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: Create user programmatically

Postby NickEntin » Tue Dec 06, 2011 2:05 pm

As I wrote above, you don't need to create folders or programmatically modify user-roles.xml - this might be configured once as default and used for any new user.
As soon as user is authenticated - those folders/files will be created updated.

This is what's called "user autocreation" in Polarion.

Of course you need to create record in passwd/access, but instead you can use LDAP, as I described before...

Best regards,
Nick

cschulz
Posts: 9
Joined: Tue Nov 22, 2011 2:29 pm

Re: Create user programmatically

Postby cschulz » Tue Dec 06, 2011 4:49 pm

Yeah but I want to control, which user can login.
I can't use LDAP authentication, because I have no AD or anything like that.
There is only an user database at a mysql server and this one I want to use.

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: Create user programmatically

Postby NickEntin » Wed Dec 14, 2011 8:48 am

It doesn't matter - create user in passwd/access file by batch or other mean and the roles in Polarion will be set automatically.

Best regards,
Nick

cschulz
Posts: 9
Joined: Tue Nov 22, 2011 2:29 pm

Re: Create user programmatically

Postby cschulz » Wed Dec 14, 2011 9:03 am

When it is created?
I have the problem, if you don't create the roles in the file, you can't login.

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: Create user programmatically

Postby NickEntin » Wed Dec 14, 2011 9:10 am

Please read carefully about auto-creation of users. If you need assistance, please approach support.

http://almdemo.polarion.com/polarion/help/?topic=/com.polarion.xray.doc.user/agchUsersPermissions.html, section "Configuring User Auto-create"

Best regards,
Nick

cschulz
Posts: 9
Joined: Tue Nov 22, 2011 2:29 pm

Re: Create user programmatically

Postby cschulz » Tue Feb 14, 2012 11:38 am

Thanks for the information, but so it would be possible, that external users can login.
I think I found a better solution over the SSO, but how can I synchronize mail address and something like that?

Is there any possibility to write my own synchronize system based on the LDAP system?

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: Create user programmatically

Postby NickEntin » Tue Feb 14, 2012 2:13 pm

Hi,

Sorry, it looks like I'm out of context again.
You can synchronize users in Polarion directly with LDAP - one-time (or more times) synchronization. Why do you need to write another script?

May be it makes sense to move our discussion to a different level - please speak to your Polarion rep. He should connect you to our Professional Services, they check your needs and offer the best practice or even development solution for you (in form of a small example, if you prefer).

Best regards,
Nick

dan7777777
Posts: 13
Joined: Wed May 17, 2017 5:08 pm

Re: Create user programmatically

Postby dan7777777 » Wed May 17, 2017 5:10 pm

Hello, have there been any improvements on this functionality? I am also trying to create a local user automatically and right now the methods from ISecurityService and IProjectService aren't doing anything (or not working as intended). Thank you!

Muneera123
Posts: 1
Joined: Sat Jul 07, 2018 4:01 am
Contact:

Re: Create user programmatically

Postby Muneera123 » Sat Jul 07, 2018 4:08 am

I don't know how to create user pro grammatically single step also why because i am not a developer.....let me know anyone about this topic.....

ISO 9001 Consultancy in Singapore

ISO Consultant in Philippines


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 4 guests