Hi Am I right that there is no extense documentation about automatic user creation and authentification in dtml-methods. I haven't found any. There is some little info about the variables and methods and I also found some discussion about it but I didn't success with that. For the use of a conference registration I want the applicants to be able to modify their indications after they subscribed a form. So I tried to create a user (with success) and authenticate him within the same method (without success). To create I use: ----------- <dtml-call "REQUEST.set('name',_.string.join([REQUEST.form.get('email')]))"> <dtml-call "REQUEST.set('pwd',REQUEST.form.get('last')+_.str(_.random.randint(0,9)))"> <dtml-call "REQUEST.set('password',pwd)"> <dtml-call "REQUEST.set('confirm',pwd)"> <dtml-call "REQUEST.set('roles', ['approvals'])"> <dtml-call "REQUEST.set('domains', '')"> <dtml-call "acl_users.manage_users(submit='Add', REQUEST=REQUEST)"> ----------- to confirm within the same method or after clicking a submit button, there seem to be different possibilities: ----------- DTML-Method: <dtml-call "acl_users.authenticate(name, pwd, REQUEST)"> <dtml-call "acl_users.autorize(name, pwd, REQUEST)"> Python-Script: security.validate(access, container, name, value, roles) ---what means 'container' and 'value'??? ----------- Thanks for any hint! Thomas _____________________________________________________________ Finally, a free email address your friends will remember! Become you@EmailAccount.com at http://www.emailaccount.com/
Thomas Widmer wrote:
----------- DTML-Method: <dtml-call "acl_users.authenticate(name, pwd, REQUEST)"> <dtml-call "acl_users.autorize(name, pwd, REQUEST)">
These probably won't work. And all this stuff should be in a python script, not a DTML method. I'd suggest looking at CMF, you may be able to just use the membership tool from the CMF to solve your problem. cheers, Chris
Thomas Widmer wrote at 2003-9-2 05:02 -0700:
... For the use of a conference registration I want the applicants to be able to modify their indications after they subscribed a form. So I tried to create a user (with success) and authenticate him within the same method (without success).
This is difficult. It is impossible when you use HTTP authentication (as in this case, the browser must provide the login information and there is no way for the server to give it this information). When you use cookie based authentication, set the cookie (the "CookieCrumber" has a method for this) and then redirect to some page. Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Thomas Widmer