[Zope-dev] Local roles and security of ZClass instances in Specialists

Steve Alexander steve@cat-box.net
Tue, 23 Jan 2001 14:21:22 +0000


Steve Spicklemire wrote:

> 
> WITH [ QUERY ] LookupAttributesAndCheckForPermission(REQUEST) COMPUTE foo, bar, baz
> 
> where LookupAttributesAndCheckForPermission get's everything it needs out of
> the REQUEST.

You could use

WITH CheckForPermission(REQUEST) and makeQuery() COMPUTE foo, bar, baz

where CheckForPermission returns 1 if the permission is ok, or raises 
unauthorized otherwise.
You might not need to pass in REQUEST if you're using a Python Script.

You could also add in an argument to CheckForPermission that indicates 
the sort of permission to check for.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net