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

All Samples(21)  |  Call(12)  |  Derive(0)  |  Import(9)
Register an __ac_permissions__ sequence.
    

        def registerPermissions(permissions, defaultDefault=('Manager', )):
    """Register an __ac_permissions__ sequence.
    """
    for setting in permissions:
        if setting[0] in _registeredPermissions:
            continue
        if len(setting)==2:
            perm, methods = setting
            default = defaultDefault
        else:
            perm, methods, default = setting
        addPermission(perm, default)
        


src/p/r/Products.PloneKeywordManager-2.1/Products/PloneKeywordManager/__init__.py   Products.PloneKeywordManager(Download)
 
# Zope imports
from AccessControl.Permission import registerPermissions
 
# CMF imports
 
registerPermissions(
    [(config.MANAGE_KEYWORDS_PERMISSION, [])],
    ('Manager', 'Site Administrator'))
 

src/z/o/Zope2-2.13.22/src/App/ProductContext.py   Zope2(Download)
import stat
 
from AccessControl.Permission import registerPermissions
from AccessControl.PermissionRole import PermissionRole
from App.Common import package_home
                if isinstance(p, tuple):
                    p, default= p
                    registerPermissions(((p, (), default),))
                else:
                    registerPermissions(((p, ()),))
 
        pr = PermissionRole(permission,default)
        registerPermissions(((permission, (), default),))
        ############################################################
 

src/z/o/Zope-HEAD/src/App/ProductContext.py   Zope(Download)
import os
 
from AccessControl.Permission import registerPermissions
from AccessControl.PermissionRole import PermissionRole
from OFS.ObjectManager import ObjectManager
                if isinstance(p, tuple):
                    p, default= p
                    registerPermissions(((p, (), default),))
                else:
                    registerPermissions(((p, ()),))
 
        pr = PermissionRole(permission,default)
        registerPermissions(((permission, (), default),))
        ############################################################
 

src/a/c/AccessControl-3.0.8/src/AccessControl/class_init.py   AccessControl(Download)
def InitializeClass(self):
    from AccessControl.Permission import registerPermissions
    from AccessControl.PermissionRole import PermissionRole
    dict=self.__dict__
    have=dict.has_key
 
    if self.__dict__.has_key('__ac_permissions__'):
        registerPermissions(self.__ac_permissions__)
        for acp in self.__ac_permissions__:
            pname, mnames = acp[:2]

src/p/r/Products.DocFinderTab-1.0.5/Products/DocFinderTab/__init__.py   Products.DocFinderTab(Download)
__refresh_module__ = 0
 
from AccessControl.Permission import registerPermissions
from permissions import ViewDocPermission, ViewDocDefaultRoles
 
 
    # Register our permission
    registerPermissions(((ViewDocPermission, (), ViewDocDefaultRoles),))
 
# Apply the inspect module patch

src/p/r/Products.CMFPlomino-1.18.6/Products/CMFPlomino/__init__.py   Products.CMFPlomino(Download)
 
# Zope
from AccessControl.Permission import registerPermissions
from Globals import DevelopmentMode
from zope import component
def initialize(context):
    """ Initialize product (standard Zope hook)
    """
    ##code-section custom-init-top #fill in your manual code here
    registerPermissions([(ADD_DESIGN_PERMISSION, []),

src/p/l/Plomino-HEAD/Products/CMFPlomino/__init__.py   Plomino(Download)
 
# Zope
from AccessControl.Permission import registerPermissions
from Globals import DevelopmentMode
from zope import component
def initialize(context):
    """ Initialize product (standard Zope hook)
    """
    ##code-section custom-init-top #fill in your manual code here
    registerPermissions([(ADD_DESIGN_PERMISSION, []),

src/s/i/silva.core.conf-3.0.3/src/silva/core/conf/utils.py   silva.core.conf(Download)
    permission = getAddPermissionName(class_)
    default = ('Manager',)
    AccessControl.Permission.registerPermissions(((permission, (), default),))
    permission_setting = PermissionRole(permission, default)
    if not (isinstance(factory, tuple) or isinstance(factory, list)):

src/i/s/IssueTrackerProduct-0.14.2/IssueTrackerProduct/__init__.py   IssueTrackerProduct(Download)
import logging
 
from AccessControl.Permission import registerPermissions
from App.Dialogs import MessageDialog
 

src/i/s/IssueTrackerProduct-HEAD/IssueTrackerProduct/__init__.py   IssueTrackerProduct(Download)
import logging
 
from AccessControl.Permission import registerPermissions
from App.Dialogs import MessageDialog