[Zope3-dev] Re: How to get Principals Roles? Owner-Role?

Marcus J. Ertl Marcus J. Ertl" <marcus.ertl@larp-welt.de
Fri, 20 Jun 2003 00:49:52 +0200


On Thu, 19 Jun 2003 16:47:26 -0400, Jim Fulton wrote:

Hi!

>To find the roles that a user has in a place, you have to find all
>of the local role grants.  See the zope security policy implementation
>to see how to do this, although I have no idea why you want this.

Hmmm, I thought about using the role a user have on a object for
checking if some parts of the page (view) should be visible or not! If
he doesn't has the role 'Moderator' or 'Owner', there's no need to show
him a link to the edit form, for example... perhabs, that may be done
more easy and natural in a different way?

Bye
   Marcus

PS: I'm proud to have written my first local service! :o)

-- 
Man sieht nur mit dem Herzen gut. Das Wesentliche ist fuer die Augen 
unsichtbar.
                            Antoine de Saint-Exupery, Der Kleine Prinz

LARP-Welt - Das LARP-Portal im Internet: http://larp-welt.de