Log:
Explicitlely set the identity provider for SQLObject in the cofiguration
because the SQLObject provider is not the default identity provider any more.
Improved error message when identity provider cannot be loaded.
Modified:
branches/1.5/turbogears/identity/base.py
branches/1.5/turbogears/qstemplates/quickstart/+package+/config/app.cfg_tmpl
Modified: branches/1.5/turbogears/identity/base.py
==============================================================================
--- branches/1.5/turbogears/identity/base.py Sat Mar 19 19:35:43 2011 (r7252)
+++ branches/1.5/turbogears/identity/base.py Sat Mar 19 19:41:30 2011 (r7253)
@@ -45,19 +45,21 @@
log.debug("Loading provider from plugin: %s", provider_plugin)
- provider_class = None
for entrypoint in plugins:
- provider_class = entrypoint.load()
+ try:
+ provider_class = entrypoint.load()
+ except Exception:
+ raise IdentityConfigurationException(
+ "IdentityProvider plugin can't be loaded: %s" % provider_plugin)
break
-
- if not provider_class:
+ else:
provider_class = load_class(provider_plugin)
if not provider_class:
raise IdentityConfigurationException(
- "IdentityProvider plugin missing: %s" % provider_plugin )
- else:
- return provider_class()
+ "IdentityProvider plugin missing: %s" % provider_plugin)
+
+ return provider_class()
def was_login_attempted():
Modified: branches/1.5/turbogears/qstemplates/quickstart/+package+/config/app.cfg_tmpl
==============================================================================
--- branches/1.5/turbogears/qstemplates/quickstart/+package+/config/app.cfg_tmpl Sat Mar 19 19:35:43 2011 (r7252)
+++ branches/1.5/turbogears/qstemplates/quickstart/+package+/config/app.cfg_tmpl Sat Mar 19 19:41:30 2011 (r7253)
@@ -209,11 +209,7 @@
# an https:// url in the failure_url, this will be respected.
identity.force_external_redirect = False
-#if $identity=='sqlobject'
-# identity.provider = '${identity}'
-#else
identity.provider = '${identity}'
-#end if
# The names of the fields on the login form containing the visitor's user ID
# and password. In addition, the submit button is specified simply so its