[Zope-CMF] Help with user roles

Adrian Madrid aem@byu.edu
Wed, 11 Apr 2001 12:29:31 -0700 (PDT)


Sorry to repost this but I haven't figured out yet how
to programatically find out if a user has certain
role. I've received some help from Tres but I can't
figure out how to use it in a script. Here goes what
he shared.

> In a PythonScript which binds '_' to the DTML
> namespace:
> 
>   # Get all roles defined in user folder.
>   _.SecurityManager().getUser().getRoles()
> 
>   # Get all roles pertaining to an object, 'foo'
>   _.SecurityGetUser().getRolesInContext( foo )

If anybody figured out how to tell if the auth user
has certain role _please_ share the zen with me/us.



=====
---------------------------
Adrian Esteban Madrid
Benson Institute, Webmaster
Brigham Young University
---------------------------
adrian_esteban@madrid.com
===========================

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/