Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(81)  |  Call(49)  |  Derive(0)  |  Import(32)
Allow a class and all of its methods to be used from a
restricted Script.  The argument Class must be a class.

        def allow_class(Class):
    """Allow a class and all of its methods to be used from a
    restricted Script.  The argument Class must be a class."""
    Class._security = sec = ClassSecurityInfo()
    sec.declareObjectPublic()
    sec.setDefaultAccess(1)
    sec.apply(Class)
    InitializeClass(Class)
        


src/p/r/Products.PythonScripts-2.13.2/src/Products/PythonScripts/Utility.py   Products.PythonScripts(Download)
# These have been relocated, and should be imported from AccessControl
 
from AccessControl import allow_module, allow_class
 

src/m/e/MegamanicEdit-2.0.15b/MegamanicEdit/MegamanicEdit/__init__.py   MegamanicEdit(Download)
    pass
 
from AccessControl import allow_class, allow_module
allow_module('MegamanicEdit.MegamanicEdit.FakeRequest')
 

Previous  1 | 2 | 3 | 4