Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 from AccessControl.Permissions import manage_users as ManageUsers
00002 from Products.PluggableAuthService.PluggableAuthService import registerMultiPlugin
00003 
00004 from plone.openid import config
00005 
00006 if not config.HAS_OPENID:
00007     import logging
00008     logger=logging.getLogger("Plone")
00009     logger.info("OpenID system packages not installed, OpenID support not available")
00010 elif not config.HAS_SSL:
00011     import logging
00012     logger=logging.getLogger("Plone")
00013     logger.info("Python does not have SSL support. OpenID support not available")
00014     config.HAS_OPENID=False
00015 else:
00016     from plugins import oid
00017     registerMultiPlugin(oid.OpenIdPlugin.meta_type)
00018 
00019 
00020 
00021 def initialize(context):
00022     if config.HAS_OPENID:
00023         context.registerClass(oid.OpenIdPlugin,
00024                                 permission=ManageUsers,
00025                                 constructors=
00026                                         (oid.manage_addOpenIdPlugin,
00027                                         oid.addOpenIdPlugin),
00028                                 visibility=None,
00029                                 icon="www/openid.png")
00030