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

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

        def gather_permissions(klass, result, seen):
    for base in klass.__bases__:
        if '__ac_permissions__' in base.__dict__:
            for p in base.__ac_permissions__:
                name=p[0]
                if name in seen:
                    continue
                result.append((name, ()))
                seen[name] = None
        gather_permissions(base, result, seen)
    return result
        


src/d/m/dm.zopepatches.zclasses-0.1.1/dm/zopepatches/zclasses/ZClass.py   dm.zopepatches.zclasses(Download)
 
from AccessControl.Permissions import create_class_instances
from AccessControl.Role import gather_permissions
from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import aq_base
        r=[]
        a=r.append
        for p in gather_permissions(c, [], d): a(p[0])
        r.sort()
        return r

src/p/r/Products.DCWorkflow-2.3.0-beta/Products/DCWorkflow/utils.py   Products.DCWorkflow(Download)
 
from AccessControl.Permission import Permission
from AccessControl.Role import gather_permissions
from AccessControl.SecurityInfo import ModuleSecurityInfo
from App.Common import package_home
    perms = getattr(ob, '__ac_permissions__', ())
    for p in perms: d[p[0]] = None
    r = gather_permissions(ob.__class__, [], d)
    if all:
        if hasattr(ob, '_subobject_permissions'):

src/p/r/Products.FileSystemSite-2.4/Products/FileSystemSite/utils.py   Products.FileSystemSite(Download)
from AccessControl.Permission import Permission
from AccessControl.PermissionRole import rolesForPermissionOn
from AccessControl.Role import gather_permissions
from Acquisition import aq_get
from Acquisition import aq_inner
    perms = getattr(ob, '__ac_permissions__', ())
    for p in perms: d[p[0]] = None
    r = gather_permissions(ob.__class__, [], d)
    if all:
       if hasattr(ob, '_subobject_permissions'):

src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/utils.py   Products.CMFCore(Download)
from AccessControl.Permission import Permission
from AccessControl.PermissionRole import rolesForPermissionOn
from AccessControl.Role import gather_permissions
from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityInfo import ModuleSecurityInfo
    perms = getattr(ob, '__ac_permissions__', ())
    for p in perms: d[p[0]] = None
    r = gather_permissions(ob.__class__, [], d)
    if all:
       if hasattr(ob, '_subobject_permissions'):