Do you know how to use Zope:s Python code protection outside Zope? So that I could run restricted Python code? I only know about http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286134 Python recipe but I'd like to know if there's faster way.
You might want to look at setting decorators on methods and in the decorator code, do your ad hoc security checks. Look at how TurboGears does it maybe.
Comment
Do you know how to use Zope:s Python code protection outside Zope? So that I could run restricted Python code? I only know about http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286134 Python recipe but I'd like to know if there's faster way.
Replies
I don't I'm afraid. Your first bet is to start looking at the Zope3 accesscontrol code which is I think is much more modular than that of Zope2.
You might want to look at setting decorators on methods and in the decorator code, do your ad hoc security checks. Look at how TurboGears does it maybe.