[Zope] Getting role information

Philip Aylesworth purple@mnsi.net
Wed, 17 Feb 1999 14:05:52 -0500


Well, the original worked for me but taking out the _.None made it show up
for annonymous users as well.

Beats me what is going on here, I just glean the list for things that look
useful to me and cut and paste, while I wait for a decent DTML reference.

Speaking of which, is there a list of attributes for things anywhere? Like
where would someone come up with AUTHENTICATED_USER.has_role() if not
swiped from the www.zope.org site? I thought AUTHENTICATED_USER was just
the name of the user and here it has attributes!

Phil.

>Hmmm...
>
>[userobject].hasRole doesn't need the _.None. The definition actually is:
>
>hasRole(list_of_roles)
>	Returns true if user has one or more roles from list_of_roles.
>
>So yo ucan test on AUTHENTICATED_USER.has_role(['Manager', 'Editor']), for
>example.
>


-----------------------------------------------------------
Philip Aylesworth                   mailto:purple@mnsi.net