def get_roles():
 from AccessControl.Role import RoleManager

 rs=RoleManager().userdefined_roles()

 return rs

i tried this in an external method but i only get:
('Anonymous', 'Authenticated', 'Manager', 'Owner')

and not all the roles i have defined in the folder.

I also tried the methods:
get_local_roles
and
valid_roles

I'm probably not using the right method, or doing something wrong. Any
further tips?

Thanks, Josh

On 23/03/07, Tres Seaver <[EMAIL PROTECTED]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Josh Burvill wrote:
> Hi everyone,
>
> I need to get all the roles that are defined in the security tab of a
> particular folder.
>
> I know how to get all roles that a user has got, but cannot find the
above.
>
> Thanks, Josh

AccessControl/Role.py is your friend.  The mix-in class is a RoleManager.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGAxgw+gerLs4ltQ4RAvaKAJ9mp8UqlIDbbRuohTXIKAaWOCN/kgCg2DjW
AVvfKLoA21KgGkVdwONtDmg=
=BsoS
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to