[Erp5-report] r38724 fabien - in /experimental/bt5/erp5_credential: ExtensionTemplateItem/ ...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Sep 28 16:04:08 CEST 2010
Author: fabien
Date: Tue Sep 28 16:04:07 2010
New Revision: 38724
URL: http://svn.erp5.org?rev=38724&view=rev
Log:
the way ERP5Site_isSingleSignOnEnable was checked was not good enought (before, it's just check that erp5_wizard was installed and return True in this case, but we can have cases where erp5_wizard is installed and nexedi_authentication is not used), improve the way it works to check if we are using nexedi_authentication or not.
Modified:
experimental/bt5/erp5_credential/ExtensionTemplateItem/Credential.py
experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_isSingleSignOnEnable.xml
experimental/bt5/erp5_credential/bt/revision
Modified: experimental/bt5/erp5_credential/ExtensionTemplateItem/Credential.py
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/ExtensionTemplateItem/Credential.py?rev=38724&r1=38723&r2=38724&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/ExtensionTemplateItem/Credential.py [utf8] (original)
+++ experimental/bt5/erp5_credential/ExtensionTemplateItem/Credential.py [utf8] Tue Sep 28 16:04:07 2010
@@ -57,3 +57,20 @@ def isLocalLoginAvailable(self, login):
return False
break
return True
+
+def isSingleSignOnEnable(self):
+ """
+ Check that 'nexedi_authentication' is in the PluggableAuthService plugins
+ list
+ """
+ portal = self.getPortalObject()
+ acl_users = getToolByName(portal, 'acl_users')
+
+ if PluggableAuthService is not None and isinstance(acl_users,
+ PluggableAuthService.PluggableAuthService.PluggableAuthService):
+ #ERP5UserManager implement IUserEnumerationPlugin
+ plugin_list = acl_users.plugins.listPlugins(
+ PluggableAuthService.interfaces.plugins.IAuthenticationPlugin)
+ if 'nexedi_authentication' in dict(plugin_list).keys():
+ return True
+ return False
Modified: experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_isSingleSignOnEnable.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_isSingleSignOnEnable.xml?rev=38724&r1=38723&r2=38724&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_isSingleSignOnEnable.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_isSingleSignOnEnable.xml [utf8] Tue Sep 28 16:04:07 2010
@@ -2,136 +2,25 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
- <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
- <key> <string>Script_magic</string> </key>
- <value> <int>3</int> </value>
+ <key> <string>_function</string> </key>
+ <value> <string>isSingleSignOnEnable</string> </value>
</item>
<item>
- <key> <string>_bind_names</string> </key>
- <value>
- <object>
- <klass>
- <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
- </klass>
- <tuple/>
- <state>
- <dictionary>
- <item>
- <key> <string>_asgns</string> </key>
- <value>
- <dictionary>
- <item>
- <key> <string>name_container</string> </key>
- <value> <string>container</string> </value>
- </item>
- <item>
- <key> <string>name_context</string> </key>
- <value> <string>context</string> </value>
- </item>
- <item>
- <key> <string>name_m_self</string> </key>
- <value> <string>script</string> </value>
- </item>
- <item>
- <key> <string>name_subpath</string> </key>
- <value> <string>traverse_subpath</string> </value>
- </item>
- </dictionary>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>_body</string> </key>
- <value> <string>"""Check if we have sso or not (master/slave or nor)\n
-Proxy:\n
-Manager -- Be sure to be able to check is SSO enable"""\n
-#TODO: Improve this and add it in introspection tool\n
-\n
-try:\n
- context.portal_wizard\n
- return True\n
-except AttributeError:\n
- return False\n
-</string> </value>
- </item>
- <item>
- <key> <string>_code</string> </key>
- <value>
- <none/>
- </value>
- </item>
- <item>
- <key> <string>_params</string> </key>
- <value> <string></string> </value>
- </item>
- <item>
- <key> <string>_proxy_roles</string> </key>
- <value>
- <tuple>
- <string>Manager</string>
- </tuple>
- </value>
- </item>
- <item>
- <key> <string>errors</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- <item>
- <key> <string>func_code</string> </key>
- <value>
- <object>
- <klass>
- <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
- </klass>
- <tuple/>
- <state>
- <dictionary>
- <item>
- <key> <string>co_argcount</string> </key>
- <value> <int>0</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>_getattr_</string>
- <string>context</string>
- <string>True</string>
- <string>AttributeError</string>
- <string>False</string>
- </tuple>
- </value>
- </item>
- </dictionary>
- </state>
- </object>
- </value>
- </item>
- <item>
- <key> <string>func_defaults</string> </key>
- <value>
- <none/>
- </value>
+ <key> <string>_module</string> </key>
+ <value> <string>Credential</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_isSingleSignOnEnable</string> </value>
</item>
<item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
</item>
</dictionary>
</pickle>
Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38724&r1=38723&r2=38724&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Tue Sep 28 16:04:07 2010
@@ -1 +1 @@
-205
\ No newline at end of file
+206
\ No newline at end of file
More information about the Erp5-report
mailing list