[Zope] addng a list of users

Bill Kerr kerrb@senet.com.au
Sat, 11 May 2002 11:53:15 +0930


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C1F8E2.6F8A0C60
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

How could I alter the code of this method (from the Book of Zope, p. =
122) so as to add multiple users from a list?
Where I have 'abc' (adds one user abc) I want to add more than one user =
simultaneously (abc, xyz etc.), all with the same PW, role and domain.
I tried inserting <dtml-in expr=3D"['abc','xyz']"> where the 'abc' is =
and put </dtml-in> in the second last line but that generated a Parse =
Error

<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<dtml-call expr=3D"REQUEST.set('roles',['noRole'])">
<dtml-call expr=3D"REQUEST.set('name','abc')">
<dtml-call expr=3D"REQUEST.set('password','change')">
<dtml-call expr=3D"REQUEST.set('confirm','change')">
<dtml-call expr=3D"REQUEST.set('domains',[])">
<dtml-call expr=3D"acl_users.manage_users('Add',REQUEST,RESPONSE)">
The user <dtml-var name=3D"name"> has been added.
<dtml-var standard_html_footer>

-- Bill

------=_NextPart_000_0007_01C1F8E2.6F8A0C60
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>How could I alter the code of this =
method (from the=20
Book of Zope, p. 122) so as to add multiple users from a =
list?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Where I have 'abc' (adds one user abc) =
I want to=20
add more than one user simultaneously (abc, xyz etc.), all with the same =
PW,=20
role and domain.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I tried inserting &lt;dtml-in=20
expr=3D"['abc','xyz']"&gt; where the 'abc' is and put &lt;/dtml-in&gt; =
in the=20
second last line but that generated a Parse Error</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-var=20
standard_html_header&gt;<BR>&lt;h2&gt;&lt;dtml-var=20
title_or_id&gt;&lt;/h2&gt;<BR>&lt;dtml-call=20
expr=3D"REQUEST.set('roles',['noRole'])"&gt;<BR>&lt;dtml-call=20
expr=3D"REQUEST.set('name','abc')"&gt;<BR>&lt;dtml-call=20
expr=3D"REQUEST.set('password','change')"&gt;<BR>&lt;dtml-call=20
expr=3D"REQUEST.set('confirm','change')"&gt;<BR>&lt;dtml-call=20
expr=3D"REQUEST.set('domains',[])"&gt;<BR>&lt;dtml-call=20
expr=3D"acl_users.manage_users('Add',REQUEST,RESPONSE)"&gt;<BR>The user=20
&lt;dtml-var name=3D"name"&gt; has been added.<BR>&lt;dtml-var=20
standard_html_footer&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-- Bill</FONT></DIV></BODY></HTML>

------=_NextPart_000_0007_01C1F8E2.6F8A0C60--