def get_roles():<br>
from AccessControl.Role import RoleManager<br>
<br>
rs=RoleManager().userdefined_roles()<br>
<br>
return rs<br>
<br>
i tried this in an external method but i only get:<br>
('Anonymous', 'Authenticated', 'Manager', 'Owner')<br>
<br>
and not all the roles i have defined in the folder.<br>
<br>
I also tried the methods:<br>
get_local_roles <br>
and<br>
valid_roles<br>
<br>
I'm probably not using the right method, or doing something wrong. Any further tips?<br>
<br>
Thanks, Josh<br><br><div><span class="gmail_quote">On 23/03/07, <b class="gmail_sendername">Tres Seaver</b> <<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Josh Burvill wrote:<br>> Hi everyone,<br>><br>> I need to get all the roles that are defined in the security tab of a<br>> particular folder.<br>><br>
> I know how to get all roles that a user has got, but cannot find the above.<br>><br>> Thanks, Josh<br><br>AccessControl/Role.py is your friend. The mix-in class is a RoleManager.<br><br><br>Tres.<br>- --<br>===================================================================
<br>Tres
Seaver +1
540-429-0999 <a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a><br>Palladion Software "Excellence by Design" <a href="http://palladion.com">http://palladion.com</a><br>-----BEGIN PGP SIGNATURE-----
<br>Version: GnuPG v1.4.2.2 (GNU/Linux)<br>Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org">http://enigmail.mozdev.org</a><br><br>iD8DBQFGAxgw+gerLs4ltQ4RAvaKAJ9mp8UqlIDbbRuohTXIKAaWOCN/kgCg2DjW<br>
AVvfKLoA21KgGkVdwONtDmg=<br>=BsoS<br>-----END PGP SIGNATURE-----<br><br>_______________________________________________<br>Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">
http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce
</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br>