Stuart, I saw your posting on the list, and I was curious if you know how to get Zope to list the users for you. I have been trying to get a select list of Users with no success. I am unable to use the getUsers() method in a constructive way. Any tips would be appreciated. All my best, Jason Spisak webmaster@mtear.com Message: 20 From: Stuart Woolford <stuartw@newmail.net> To: zope@zope.org Subject: [Zope] acl_users dtml access help please... Date: Wed, 8 Sep 1999 21:47:12 +1200 I'm working on a cut-down replacement for control of users in an acl_users directory from a dtml document, for example, I can: <dtml-if names> <dtml-call "REQUEST.set('names',names)"> <dtml-call "manage_users('Delete',REQUEST)"> <dtml-call "RESPONSE.redirect(URL0)"> </dtml-if> to remove users from a list of users selected for removal, it works well, HOWEVER.. I also need to change the roles of users between a defined set I have in select lists on the form, I cannot work out how to do this, I either need to use manage_users('Change',...), for which I have to know their previous password, or I need to give them a new password, I cannot work out how to address the password a user already has, which is in the __ variable (to make it hard to get at, I'm guessing). This is in Zope 2.0.0, BTW. for example, I can quite happly use (roles and thepass are lists off my form) <dtml-if roles> <dtml-in roles> <dtml-var expr="getUsers()[_['sequence-index']].name>" <dtml-var expr="roles[_['sequence-index']]">: <dtml-var expr="thepass[_['sequence-index']]"><p> </dtml-in> </dtml-if> Bt I cannot work out a line to print a password (ie: the equivalent of the following) <dtml-var expr="getUsers()[_['sequence-index']]".__>: can anyone help me???? ------------------------------------------------------------ Stuart Woolford Unix Consultant. Software Developer. Supra Club of New Zealand. ------------------------------------------------------------
On Thu, 09 Sep 1999, Jason Spisak wrote:
Stuart,
I saw your posting on the list, and I was curious if you know how to get Zope to list the users for you.
I have been trying to get a select list of Users with no success. I am unable to use the getUsers() method in a constructive way.
Any tips would be appreciated.
All my best,
Jason Spisak webmaster@mtear.com
I use the following: <dtml-with acl_users> <form action=<dtml-var URL0> METHOD="get"> <table cellspacing=0 border> <dtml-in getUsers> <tr><th>User Name</th><th>User Level</th><th>Password</th><th>Delete</th></tr> <tr> <td><dtml-var name></td> <dtml-let theuser=sequence-item><td><select name="theroles:list"> <dtml-in "['none','restricted','readonly','update','system']"> <option value="<dtml-var sequence-item>" <dtml-if expr="_['sequence-item'] in theuser.roles">SELECTED</dtml-if>> <dtml-var sequence-item> </dtml-in></select></td></dtml-let> <td><input type=password name="thepass:list" value=<dtml-var "getPass(_['sequence-item'])">></td> <td><input type="checkbox" name="delete:list" value=<dtml-var name>></td> </tr> </dtml-in> </table> <input name=SUBMIT type="SUBMIT" value="Go"> </dtml-with> This does a little moore than you are looking for, and there is more to this form, but you get the idea? Only took me 3 days to guess it myself ;) Hope it helps (and hope I've cut it out correctly, should work) This trick is to acquire the acl_users from your parent folder, they you are getting it's user list (NOT the base one, which you need to get differently unless you are in the base directory) -------------------------------------- Stuart Woolford, stuartw@newmail.net Unix Consultant. Software Developer. Supra Club of New Zealand. ------------------------------------------------------------
participants (2)
-
Jason Spisak -
Stuart Woolford