Creating a new user
Hello, I have been looking at the API and I can't find a way to create a user programatically. Am I right in thinking that this is not possible using the standar user folder? Cheers Neil Blue
Try looking at manage_users method in <zopedir>lib/python/AccessControl/user.py hth Phil ----- Original Message ----- From: "Blue, Neil" <NBlue@synomics.com> To: <zope@zope.org> Sent: Wednesday, May 02, 2001 2:03 PM Subject: [Zope] Creating a new user
Hello,
I have been looking at the API and I can't find a way to create a user programatically. Am I right in thinking that this is not possible using the standar user folder?
Cheers Neil Blue
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Chris Withers wrote:
"Blue, Neil" wrote:
programatically. Am I right in thinking that this is not possible using the standar user folder?
No, you are not right ;-)
Something the 'old-timers' here drilled into me: "If you can do it from the ZMI, you can do it in your code too." The source awaits you! -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
With the following code you can add a new user: <dtml-call "REQUEST.set('name', 'theUserName)"> <dtml-call "REQUEST.set('password', 'thePassword)"> <dtml-call "REQUEST.set('confirm', 'thePassword')"> <dtml-call "REQUEST.set('domains', [])"> <dtml-call "REQUEST.set('roles', ['Manager', 'Owner'])"> <dtml-call "acl_users.manage_users('Add', REQUEST,RESPONSE)"> Best regards Arno On Wed, 02 May 2001, Blue, Neil wrote:
Hello,
I have been looking at the API and I can't find a way to create a user programatically. Am I right in thinking that this is not possible using the standar user folder?
Cheers Neil Blue
How would one do this in a python script?
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Arno Gross Sent: Wednesday, May 02, 2001 9:18 AM To: Blue, Neil; zope@zope.org Subject: Re: [Zope] Creating a new user
With the following code you can add a new user:
<dtml-call "REQUEST.set('name', 'theUserName)"> <dtml-call "REQUEST.set('password', 'thePassword)"> <dtml-call "REQUEST.set('confirm', 'thePassword')"> <dtml-call "REQUEST.set('domains', [])"> <dtml-call "REQUEST.set('roles', ['Manager', 'Owner'])"> <dtml-call "acl_users.manage_users('Add', REQUEST,RESPONSE)">
Best regards Arno
On Wed, 02 May 2001, Blue, Neil wrote:
Hello,
I have been looking at the API and I can't find a way to create a user programatically. Am I right in thinking that this is not possible using the standar user folder?
Cheers Neil Blue
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi! You can find the answer to your question on User.py file. You can find it on the zope hierarchy. your_zope_directory/lib/python/AccessControl Paula On Wed, 2 May 2001, Steve Drees wrote:
How would one do this in a python script?
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Arno Gross Sent: Wednesday, May 02, 2001 9:18 AM To: Blue, Neil; zope@zope.org Subject: Re: [Zope] Creating a new user
With the following code you can add a new user:
<dtml-call "REQUEST.set('name', 'theUserName)"> <dtml-call "REQUEST.set('password', 'thePassword)"> <dtml-call "REQUEST.set('confirm', 'thePassword')"> <dtml-call "REQUEST.set('domains', [])"> <dtml-call "REQUEST.set('roles', ['Manager', 'Owner'])"> <dtml-call "acl_users.manage_users('Add', REQUEST,RESPONSE)">
Best regards Arno
On Wed, 02 May 2001, Blue, Neil wrote:
Hello,
I have been looking at the API and I can't find a way to create a user programatically. Am I right in thinking that this is not possible using the standar user folder?
Cheers Neil Blue
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- ============================================================ Quando tiver duvidas, nao questione aqueles que so' tem certezas, pois corre o risco de ficar com mais duvidas!... ------------------------------------------------------------ Paula Monteiro Mangas e-mail: Paula.Mangas@mail.com URL: http://students.fct.unl.pt/~pamm/ TMV: (+351) 96 2559034 ============================================================
Steve Drees wrote:
How would one do this in a python script?
REQUEST = context.REQUEST RESPONSE = REQUEST.RESPONSE REQUEST.set('name', 'theUserName) REQUEST.set('password', 'thePassword) REQUEST.set('confirm', 'thePassword') REQUEST.set('domains', []) REQUEST.set('roles', ['Manager', 'Owner']) context.acl_users.manage_users('Add', REQUEST,RESPONSE) cheers, Chris
participants (7)
-
Arno Gross -
Blue, Neil -
Chris Withers -
Paula Mangas -
Phil Harris -
Steve Drees -
Tim Cook