[Zope] Envoking Zope's security manually?

herman geldenhuys herman_geldenhuys at hotmail.com
Thu Jan 8 10:27:25 EST 2004


Hi there.

What is the proper way to validate zope's security in an unrestricted 
script?

...object = make a request object and wrap the root zope object...

result = object.aq_acquire(methodName)
if not AccessControl.getSecurityManager().validate(object, None, methodName, 
result):
    raise Exception('Unauthorised:' + methodName)

I know this should be close to what is should be. But what about an objects 
properties, and accessing their __str__ and __call__ type methods.

Is there a formal way of envoking Zope's security?

Thanks

Herman

_________________________________________________________________
Rain, shine, sleet, snow? Find out at MSN Weather! 
http://www.msn.co.za/weather/




More information about the Zope mailing list