[Zope] how can I determine the list of user names?

jpenny@universal-fasteners.com jpenny@universal-fasteners.com
Thu, 24 Aug 2000 12:13:48 -0400


On Thu, Aug 24, 2000 at 10:05:18AM +1000, Curtis Maloney wrote:
> On Thu, 24 Aug 2000, jpenny@universal-fasteners.com wrote:
> > I would like to construct a pull down of the users defined in
> > an acl_users of a particular location.
> >
> I am doing this soon, also, so I've put in a little thought on the problem. 
> (But only a little :)
> 
> > Say in particular, that /protected/acl_users exists.  How do
> > I find (in dtml or in python), the list of names defined in that
> > particular acl_users.
> >
> 
> My guess (untested) is :
> 
> <select name="users">
>   <dtml-in getUserNames>
>     <option value="<dtml-var sequence-item>"><dtml-var sequence-item>
>   </dtml-in>
> </select>

Thanks.  Real close.  Again, assuming /protected/acl_users is the list
of users I am interested in:

<dtml-in "protected.acl_users.getUserNames()">
     <dtml-var sequence-item>
</dtml-in>

will grab the user names.  The pull down is basic html.

>   
> > To slightly generalize, how would one tree-walk to find the list
> > of all acl_users above a particular object?

I am not really worried about this.  The above suffices for me (and I
think I could do it from the above anyway).  This part of the question was
asked only for completeness.
> 
> Well, as I said, this is untested, but I'm assuming getUserNames does this 
> for you.  The ZQR is somewhat sparse on the details.
> 
> >
> > Thanks
> >
> Please, let me know how this goes.
> 
> > Jim
> >
> 
> Have a better one,
> 	Curtis Maloney
> 
> _______________________________________________
> 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 )
>