Show More
@@ -474,12 +474,7 b' def loadplugin(plugin_id):' | |||
|
474 | 474 | """ |
|
475 | 475 | Loads and returns an instantiated authentication plugin. |
|
476 | 476 | Returns the RhodeCodeAuthPluginBase subclass on success, |
|
477 |
|
|
|
478 | ||
|
479 | raises: | |
|
480 | KeyError -- if no plugin available with given name | |
|
481 | TypeError -- if the RhodeCodeAuthPlugin is not a subclass of | |
|
482 | ours RhodeCodeAuthPluginBase | |
|
477 | or None on failure. | |
|
483 | 478 | """ |
|
484 | 479 | # TODO: Disusing pyramids thread locals to retrieve the registry. |
|
485 | 480 | authn_registry = get_current_registry().getUtility(IAuthnPluginRegistry) |
@@ -995,9 +995,12 b' def ValidAuthPlugins():' | |||
|
995 | 995 | from rhodecode.authentication.base import loadplugin |
|
996 | 996 | module_list = value |
|
997 | 997 | unique_names = {} |
|
998 | try: | |
|
999 | 998 |
|
|
1000 | 999 |
|
|
1000 | if plugin is None: | |
|
1001 | raise formencode.Invalid( | |
|
1002 | _("Can't find plugin with id '{}'".format(module)), | |
|
1003 | value, state) | |
|
1001 | 1004 |
|
|
1002 | 1005 |
|
|
1003 | 1006 |
|
@@ -1005,8 +1008,6 b' def ValidAuthPlugins():' | |||
|
1005 | 1008 |
|
|
1006 | 1009 |
|
|
1007 | 1010 |
|
|
1008 | except (KeyError, AttributeError, TypeError) as e: | |
|
1009 | raise formencode.Invalid(str(e), value, state) | |
|
1010 | 1011 | |
|
1011 | 1012 | return _validator |
|
1012 | 1013 |
General Comments 0
You need to be logged in to leave comments.
Login now