Back to index

plone3  3.1.7
Classes | Functions | Variables
PluggableAuthService.PluggableAuthService Namespace Reference

Classes

class  DumbHTTPExtractor
class  EmergencyUserAuthenticator
class  PluggableAuthService
class  ResponseCleanup

Functions

def registerMultiPlugin
def addPluggableAuthService
def addConfiguredPASForm
def addConfiguredPAS

Variables

tuple security
tuple logger = logging.getLogger('PluggableAuthService')
tuple _SWALLOWABLE_PLUGIN_EXCEPTIONS
list MultiPlugins = []
tuple _PLUGIN_TYPE_INFO

Function Documentation

def PluggableAuthService.PluggableAuthService.addConfiguredPAS (   dispatcher,
  base_profile,
  extension_profiles = (),
  create_snapshot = True,
  setup_tool_id = 'setup_tool',
  REQUEST = None 
)
Add a PluggableAuthService to 'self.

Definition at line 1317 of file PluggableAuthService.py.

01317 
01318                     ):
01319     """ Add a PluggableAuthService to 'self.
01320     """
01321     from Products.GenericSetup.tool import SetupTool
01322 
01323     pas = PluggableAuthService()
01324     preg = PluginRegistry( _PLUGIN_TYPE_INFO )
01325     preg._setId( 'plugins' )
01326     pas._setObject( 'plugins', preg )
01327     dispatcher._setObject( pas.getId(), pas )
01328 
01329     pas = dispatcher._getOb( pas.getId() )    # wrapped
01330     tool = SetupTool( setup_tool_id )
01331     pas._setObject( tool.getId(), tool )
01332 
01333     tool = pas._getOb( tool.getId() )       # wrapped
01334     tool.setImportContext( 'profile-%s' % base_profile )
01335     tool.runAllImportSteps()
01336 
01337     for extension_profile in extension_profiles:
01338         tool.setImportContext( 'profile-%s' % extension_profile )
01339         tool.runAllImportSteps()
01340 
01341     tool.setImportContext( 'profile-%s' % base_profile )
01342 
01343     if create_snapshot:
01344         tool.createSnapshot( 'initial_configuration' )
01345 
01346     if REQUEST is not None:
01347         REQUEST['RESPONSE'].redirect(
01348                                 '%s/manage_workspace'
01349                                 '?manage_tabs_message='
01350                                 'PluggableAuthService+added.'
01351                               % dispatcher.absolute_url() )
01352 

Here is the caller graph for this function:

Wrap the PTF in 'dispatcher', including 'profile_registry' in options.

Definition at line 1291 of file PluggableAuthService.py.

01291 
01292 def addConfiguredPASForm(dispatcher):
01293     """ Wrap the PTF in 'dispatcher', including 'profile_registry' in options.
01294     """
01295     from Products.GenericSetup import EXTENSION
01296     from Products.GenericSetup import profile_registry
01297 
01298     wrapped = PageTemplateFile( 'pasAddForm', _wwwdir ).__of__( dispatcher )
01299 
01300     base_profiles = []
01301     extension_profiles = []
01302 
01303     for info in profile_registry.listProfileInfo(for_=IPluggableAuthService):
01304         if info.get('type') == EXTENSION:
01305             extension_profiles.append(info)
01306         else:
01307             base_profiles.append(info)
01308 
01309     return wrapped( base_profiles=tuple(base_profiles),
01310                     extension_profiles =tuple(extension_profiles) )

Here is the call graph for this function:

def PluggableAuthService.PluggableAuthService.addPluggableAuthService (   dispatcher,
  base_profile = None,
  extension_profiles = (),
  create_snapshot = True,
  setup_tool_id = 'setup_tool',
  REQUEST = None 
)
Add a PluggableAuthService to 'dispatcher'.

o BBB for non-GenericSetup use.

Definition at line 1273 of file PluggableAuthService.py.

01273 
01274                            ):
01275     """ Add a PluggableAuthService to 'dispatcher'.
01276 
01277     o BBB for non-GenericSetup use.
01278     """
01279     pas = PluggableAuthService()
01280     preg = PluginRegistry( _PLUGIN_TYPE_INFO )
01281     preg._setId( 'plugins' )
01282     pas._setObject( 'plugins', preg )
01283     dispatcher._setObject( pas.getId(), pas )
01284 
01285     if REQUEST is not None:
01286         REQUEST['RESPONSE'].redirect(
01287                                 '%s/manage_workspace'
01288                                 '?manage_tabs_message='
01289                                 'PluggableAuthService+added.'
01290                               % dispatcher.absolute_url() )

Here is the caller graph for this function:

Register a 'multi-plugin' in order to expose it to the Add List

Definition at line 104 of file PluggableAuthService.py.

00104 
00105 def registerMultiPlugin(meta_type):
00106     """ Register a 'multi-plugin' in order to expose it to the Add List
00107     """
00108     if meta_type in MultiPlugins:
00109         raise RuntimeError('Meta-type (%s) already available to Add List'
00110                            % meta_type)
00111     MultiPlugins.append(meta_type)


Variable Documentation

Definition at line 1160 of file PluggableAuthService.py.

Initial value:
00001 ( NameError
00002                                  , AttributeError
00003                                  , KeyError
00004                                  , TypeError
00005                                  , ValueError
00006                                  )

Definition at line 96 of file PluggableAuthService.py.

Definition at line 93 of file PluggableAuthService.py.

Definition at line 103 of file PluggableAuthService.py.

Initial value:
00001 ModuleSecurityInfo(
00002     'Products.PluggableAuthService.PluggableAuthService' )

Definition at line 90 of file PluggableAuthService.py.