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

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)

        def getSecurityInfo(klass):
    sec = {}
    info = vars(klass)
    if info.has_key('__ac_permissions__'):
        sec['__ac_permissions__'] = info['__ac_permissions__']
    for k, v in info.items():
        if k.endswith('__roles__'):
            sec[k] = v
    return sec
        


src/z/o/Zope-HEAD/src/Products/Five/browser/metaconfigure.py   Zope(Download)
 
from AccessControl.class_init import InitializeClass
from AccessControl.security import getSecurityInfo
from AccessControl.security import protectClass
from AccessControl.security import protectName
            cdict['__name__'] = name
            cdict['__page_attribute__'] = attribute
            cdict.update(getSecurityInfo(class_))
            new_class = type(class_.__name__, (class_, simple,), cdict)
 
 
        if class_ is not None:
            cdict.update(getSecurityInfo(class_))
            bases = (class_, simple)
        else:
             '__name__': name}
    if bases:
        cdict.update(getSecurityInfo(bases[0]))
    class_ = type("SimpleViewClass from %s" % src, bases,
                  cdict)

src/z/o/Zope2-2.13.22/src/Products/Five/browser/metaconfigure.py   Zope2(Download)
 
from AccessControl.class_init import InitializeClass
from AccessControl.security import getSecurityInfo
from AccessControl.security import protectClass
from AccessControl.security import protectName
                    "The provided class doesn't have the specified attribute "
                    )
        cdict = getSecurityInfo(class_)
        cdict['__name__'] = name
        if template:

src/p/r/Products.jsonserver-1.2b6/Products/jsonserver/metaconfigure.py   Products.jsonserver(Download)
try: # Zope 2.13
    from AccessControl.security import CheckerPrivateId
    from AccessControl.security import getSecurityInfo
    from AccessControl.security import protectClass
    from AccessControl.security import protectName