def include(package, file=None): """ include is different from scan. Include is for including a regular zcml include """ register_configuration(caller_module(), dict(package=package, file=file), 'include')
def grant(principal=None, role=None, permission=None, permissions=None): register_configuration( caller_module(), dict(principal=principal, role=role, permission=permission, permissions=permissions), 'grant')
def grant_all(principal=None, role=None): register_configuration( caller_module(), dict( principal=principal, role=role), 'grant_all')
def __call__(self, klass=None): if klass is None: if 'factory' not in self.config: raise Exception('Must provide factory configuration when defining ' 'without a class') klass = caller_module() return super(_factory_decorator, self).__call__(klass)
def __call__(self, klass=None): if klass is None: if 'factory' not in self.config: raise Exception( 'Must provide factory configuration when defining ' 'without a class') klass = caller_module() return super(_factory_decorator, self).__call__(klass)
def permission(id, title, description=''): register_configuration( caller_module(), dict( id=id, title=title, description=description), 'permission')
def include(package, file=None): """ include is different from scan. Include is for including a regular zcml include """ register_configuration( caller_module(), dict(package=package, file=file), 'include')
def role(id, title, description='', local=True): register_configuration( caller_module(), dict( id=id, title=title, description=description, local=local), 'role')
def grant(principal=None, role=None, permission=None, permissions=None): register_configuration( caller_module(), dict( principal=principal, role=role, permission=permission, permissions=permissions), 'grant')
def grant_all(principal=None, role=None): register_configuration(caller_module(), dict(principal=principal, role=role), 'grant_all')
def role(id, title, description=''): register_configuration(caller_module(), dict(id=id, title=title, description=description), 'role')
def permission(id, title, description=''): register_configuration(caller_module(), dict(id=id, title=title, description=description), 'permission')