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.
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.
Comment
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.
Parent 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.