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

All Samples(251)  |  Call(90)  |  Derive(0)  |  Import(161)

        def ModuleSecurityInfo(module_name=None):
    if module_name is not None:
        modsec = _moduleSecurity.get(module_name, None)
        if modsec is not None:
            return modsec
        modsec = _appliedModuleSecurity.get(module_name, None)
        if modsec is not None:
            # Move security info back to to-apply dict (needed for product
            # refresh). Also invoke this check for parent packages already
            # applied
            del _appliedModuleSecurity[module_name]
            _moduleSecurity[module_name] = modsec
            dot = module_name.rfind('.')
            if dot > 0:
                ModuleSecurityInfo(module_name[:dot])
            return modsec
        dot = module_name.rfind('.')
        if dot > 0:
            # If the module is in a package, recursively make sure
            # there are security declarations for the package steps
            # leading to the module
            modname = module_name[dot + 1:]
            pmodsec = ModuleSecurityInfo(module_name[:dot])
            if modname not in pmodsec.names:
                pmodsec.declarePublic(modname)
    return _ModuleSecurityInfo(module_name)
        


src/p/r/Products.PythonScripts-2.13.2/src/Products/PythonScripts/module_access_examples.py   Products.PythonScripts(Download)
 
from AccessControl import allow_module, allow_class, allow_type
from AccessControl import ModuleSecurityInfo
 
 

src/e/r/erp5-HEAD/product/ERP5/Tool/NotificationTool.py   erp5(Download)
from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions
from AccessControl import ModuleSecurityInfo
from Products.ERP5 import _dtmldir
 
class MimeTypeException(Exception): pass
 
security = ModuleSecurityInfo('Products.ERP5.Tool.NotificationTool')
security.declarePublic('buildEmailMessage',)
 

src/e/r/erp5-HEAD/product/ERP5Type/WebDAVSupport.py   erp5(Download)
import transaction
from Acquisition import aq_parent, aq_inner, aq_base
from AccessControl import ClassSecurityInfo, ModuleSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint
from Products.CMFCore.PortalContent import ResourceLockedError
from zLOG import LOG
 
security = ModuleSecurityInfo( 'Products.ERP5Type.WebDAVSupport' )
 
class SimpleHTMLParser(CMFSimpleHTMLParser):

src/z/o/Zope2-2.13.22/src/Products/Sessions/__init__.py   Zope2(Download)
    # stupid for me to declare in two places without overwriting one set
    # with the other. :-(
    from AccessControl import ModuleSecurityInfo
    security = ModuleSecurityInfo('Products')
    security.declarePublic('Sessions')
    security.declarePublic('Transience')
 
    security = ModuleSecurityInfo('Products.Sessions.interfaces')
    security.setDefaultAccess('allow')
 
    security = ModuleSecurityInfo('Products.Transience')
    security.declarePublic('MaxTransientObjectsExceeded')
 
    #BBB for names which should be imported from Products.Sessions.interfaces
    security = ModuleSecurityInfo('Products.Sessions')

src/z/o/Zope-HEAD/src/Products/Sessions/__init__.py   Zope(Download)
    # stupid for me to declare in two places without overwriting one set
    # with the other. :-(
    from AccessControl import ModuleSecurityInfo
    security = ModuleSecurityInfo('Products')
    security.declarePublic('Sessions')
    security.declarePublic('Transience')
 
    security = ModuleSecurityInfo('Products.Sessions.interfaces')
    security.setDefaultAccess('allow')
 
    security = ModuleSecurityInfo('Products.Transience')
    security.declarePublic('MaxTransientObjectsExceeded')
 
    #BBB for names which should be imported from Products.Sessions.interfaces
    security = ModuleSecurityInfo('Products.Sessions')

src/p/r/Products.PluggableAuthService-1.10.0/Products/PluggableAuthService/permissions.py   Products.PluggableAuthService(Download)
$Id$
"""
from AccessControl import ModuleSecurityInfo
from AccessControl import Permissions
 
security = ModuleSecurityInfo( 'Products.PluggableAuthService.permissions' )

src/p/r/Products.FileSystemSite-2.4/Products/FileSystemSite/exceptions.py   Products.FileSystemSite(Download)
"""
 
from AccessControl import ModuleSecurityInfo
from AccessControl import Unauthorized as AccessControl_Unauthorized
from OFS.CopySupport import CopyError
 
 
security = ModuleSecurityInfo('Products.CMFCore.exceptions')
 
# Use AccessControl_Unauthorized to raise Unauthorized errors and

src/p/r/Products.DataGridField-1.9.0/Products/DataGridField/utils.py   Products.DataGridField(Download)
__docformat__ = 'restructuredtext'
 
from AccessControl import ModuleSecurityInfo, allow_module
from Products.CMFCore.utils import getToolByName
 
 
module = "Products.DataGridField.utils"
security = ModuleSecurityInfo(module)

src/p/r/Products.remember-1.9.3/Products/remember/utils.py   Products.remember(Download)
logger = logging.getLogger('remember')
 
from AccessControl import ModuleSecurityInfo
from AccessControl import Unauthorized
from AccessControl.SecurityManagement import newSecurityManager
 
 
security = ModuleSecurityInfo('Products.remember.utils')
 
 

src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/exceptions.py   Products.CMFCore(Download)
""" CMFCore product exceptions. """
 
from AccessControl import ModuleSecurityInfo
from AccessControl import Unauthorized as AccessControl_Unauthorized
from OFS.CopySupport import CopyError
 
 
security = ModuleSecurityInfo('Products.CMFCore.exceptions')
 
# Use AccessControl_Unauthorized to raise Unauthorized errors and

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next