[Zope] Getting roles as a list
Jason Spisak
webmaster@MTEAR.COM
Wed, 08 Sep 1999 19:49:28 -0800
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.
------------------------------------------------------------