[Zope] Check Security Permissions for a User?

Maik Jablonski maik.jablonski@uni-bielefeld.de
Thu, 24 Jan 2002 12:00:46 +0100


hello,

I played with the following code in a dtml-method to check if a user has a 
certain permission (e.g. "Manage Properties"):

<dtml-var "_.SecurityGetUser().has_permission('Manage Properties',this())">

This results in 1 if the User has the permission or None if not... 
everything is fine so far.

But when I do check for a nonexisting permission, like:

<dtml-var "_.SecurityGetUser().has_permission('Really Unknown 
PermisionXXX',this())">

the result would be 1 too... What is the reason for this SecurityPolicy? 
Why not an exception? Or 0?

thank you for advice

Maik Jablonski.