[Zope] re module & through the web security

Dan L. Pierson dan@sol.control.com
Thu, 7 Sep 2000 13:26:42 -0400 (EDT)


Evan Simpson writes:
 > Fear not.  In the brand new shiny PythonMethods Product coming soon
 > (really!) to a Zope near you, you will have the ability to say:
 > 
 > ModuleSecurityInfo('re').protect('compile', 'Use the "re" module')
 > 
 > ...and suddenly anyone to whom you grant 'Use the "re" module' permission
 > will be able to 'from re import compile' in their Python Methods.  Anyone
 > else will be able to 'import re', but not access any of its contents.

Thank you!  I was going to follow Chris McDonough's suggestion and add
something to the Wiki about this but your solution is just perfect.
Of course I have a couple of questions since I couldn't find any
mention of this in the Wiki:

Does this work for any module or just a semi-safe subset?

How are submodules handled?  Just put the full path in the
ModuleSecurityInfo call?  Can you grant permissions for all children
of a parent module (scary!)?