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

All Samples(27)  |  Call(27)  |  Derive(0)  |  Import(0)

src/a/c/AccessControl-3.0.8/src/AccessControl/rolemanager.py   AccessControl(Download)
            name, value = p[:2]
            p=Permission(name, value, self)
            roles = p.getRoles(default=[])
            d={'name': name,
               'acquire': isinstance(roles, list) and 'CHECKED' or '',
            name, value = p[:2]
            p = Permission(name, value, self)
            roles = p.getRoles()
            if roles is None:
                continue
            name, value = p[:2]
            p = Permission(name, value, self)
            roles = p.getRoles()
            r.append({'name': name,
                      'selected': role in roles and 'SELECTED' or '',
            if name==permission:
                p = Permission(name, value, self)
                roles = p.getRoles()
                return map(
                    lambda role, roles=roles:
            if name==permission:
                p=Permission(name, value, self)
                roles = p.getRoles()
                return isinstance(roles, list) and 'CHECKED' or ''
 

src/e/u/Euphorie-6.3.1/src/euphorie/deployment/upgrade/v2.py   Euphorie(Download)
def resetPublishPermission(context):
    from AccessControl.Permission import Permission
    siteroot = aq_parent(context)
    permission = Permission("Euphorie: Publish a Survey", (), siteroot)
    if "CountryManager" not in permission.getRoles(default=[]):

src/p/r/Products.contentmigration-2.1.8/Products/contentmigration/inplace.py   Products.contentmigration(Download)
        for key, values in oldmap.items():
            old_p = Permission(key, values, self.old)
            old_roles = old_p.getRoles(default=_marker)
            if old_roles is _marker:
                continue

src/e/r/erp5-HEAD/product/ERP5Type/CopySupport.py   erp5(Download)
        name, value = (permission, ())
      p = Permission(name,value,context)
      old_role_list = p.getRoles(default=[])
      p.setRoles(user_role_list)
      result = method(*method_argv, **method_kw)

src/p/r/Products.FileSystemSite-2.4/Products/FileSystemSite/FSObject.py   Products.FileSystemSite(Download)
        for old_perm, value in old_info:
            p = Permission(old_perm, value, self)
            acquired = int(isinstance(p.getRoles(default=[]), list))
            rop_info = self.rolesOfPermission(old_perm)
            roles = [x['name'] for x in rop_info if x['selected'] != '']

src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/FSObject.py   Products.CMFCore(Download)
        for old_perm, value in old_info:
            p = Permission(old_perm, value, self)
            acquired = int(isinstance(p.getRoles(default=[]), list))
            rop_info = self.rolesOfPermission(old_perm)
            roles = [x['name'] for x in rop_info if x['selected'] != '']

src/p/r/Products.Silva-3.0.4/Products/Silva/Security/management.py   Products.Silva(Download)
    def is_acquired(self):
        permission = Permission(SilvaPermissions.View, (), self.context)
        return isinstance(permission.getRoles(default=[]), list)
 
    def set_minimum_role(self, role):

src/t/e/teamrubber.theoracle-1.0/teamrubber/theoracle/browser/user.py   teamrubber.theoracle(Download)
            for permission in acquired_permissions:
                p = Permission(permission,(),parent)
                roles = p.getRoles(default=[])
                for role in roles:
                    current = result.get(permission,{})

src/p/r/Products.GenericSetup-1.7.4/Products/GenericSetup/rolemap.py   Products.GenericSetup(Download)
            name = perm[ 0 ]
            p = Permission( name, perm[ 1 ], self._site )
            roles = p.getRoles( default=[] )
            acquire = isinstance( roles, list )  # tuple means don't acquire
            roles = [ r for r in roles if r in valid_roles ]

src/p/r/Products.Carousel-2.2.1/Products/Carousel/utils.py   Products.Carousel(Download)
        name, value = p[:2]
        p=Permission(name, value, context)
        roles=list(p.getRoles())
 
        #print "Permission:" + name + " roles " + str(roles)
        name, value = p[:2]
        p=Permission(name, value, context)
        roles=list(p.getRoles())
 
        #print "Permission:" + name + " roles " + str(roles)

  1 | 2 | 3  Next