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

All Samples(3)  |  Call(0)  |  Derive(1)  |  Import(2)

src/c/o/collective.teamwork-0.9/collective/teamwork/user/localrole.py   collective.teamwork(Download)
# local role components including a PAS local role manager plugin
#  See http://goo.gl/ymRxG for (slightly outdated) documentation of the
#   basic idea here, or look at source for borg.localrole.workspace module..
 
from borg.localrole.workspace import WorkspaceLocalRoleManager as BasePlugin
class WorkspaceLocalRoleManager(BasePlugin):
    """
    PAS local roles manager plugin for a workspaces site; acts
    like the base plugin, except:
 

src/c/o/collective.teamwork-0.9/collective/teamwork/setuphandlers.py   collective.teamwork(Download)
from StringIO import StringIO
 
from borg.localrole.config import LOCALROLE_PLUGIN_NAME as STOCK_PLUGIN_NAME
from borg.localrole.workspace import WorkspaceLocalRoleManager as STOCK_CLS
from Products.CMFCore.utils import getToolByName
    if STOCK_PLUGIN_NAME in uf.plugins._getPlugins(ILocalRolesPlugin):
        original_plugin = getattr(uf, STOCK_PLUGIN_NAME, None)
        if isinstance(original_plugin, STOCK_CLS):
            print >> out, 'deactivated stock borg.localrole plugin'
            uf.plugins.deactivatePlugin(ILocalRolesPlugin, STOCK_PLUGIN_NAME)