Back to index

plone3  3.1.7
Functions
borg.localrole.utils Namespace Reference

Functions

def setup_localrole_plugin

Function Documentation

Install and prioritize the local-role PAS plug-in

Definition at line 9 of file utils.py.

00009 
00010 def setup_localrole_plugin(portal):
00011     """Install and prioritize the local-role PAS plug-in
00012     """
00013     out = StringIO()
00014     
00015     uf = getToolByName(portal, 'acl_users')
00016 
00017     existing = uf.objectIds()
00018 
00019     if LOCALROLE_PLUGIN_NAME not in existing:
00020         manage_addWorkspaceLocalRoleManager(uf, LOCALROLE_PLUGIN_NAME)
00021         activatePluginInterfaces(portal, LOCALROLE_PLUGIN_NAME, out)
00022     else:
00023         print >> out, "%s already installed" % LOCALROLE_PLUGIN_NAME
00024         
00025     return out.getvalue()

Here is the call graph for this function:

Here is the caller graph for this function: