[Zope-CMF] Managing Portal Roles

Joćo Neves joao@fabricadeideias.com
Tue, 25 Sep 2001 19:42:04 -0300


Hi All,

I'm working on a form to permit user management similar to what is found
in the ZMI (manage_users).
I got to a point where I can list the Portal Roles, but nothing I've
tried can get the roles a member already has to come up SELECTED. Here
is a snippet of the code I'm using:

'membro' is mapped to the member being edited..

<select name="roles:list" multiple>
    <dtml-in "portal_membership.getPortalRoles()">
    <option value="<dtml-var sequence-item>"<dtml-if
membro.has_role(_['sequence-item'])> SELECTED </dtml-if>><dtml-var
sequence-item>
    </dtml-in>
    </select>

What am I doing wrong?

TIA,
--
-------------------------------------------
Joćo Neves
joao@fabricadeideias.com
Fabrica de Ideias
SBS - Ed. Empire Center - bl. S - sala 508
cep 70070-904 - Brasilia - DF - Brazil
tel: (61) 321 1357
fax: (61) 223 1712
-------------------------------------------