Show More
@@ -27,6 +27,7 b' from rhodecode.authentication.registry i' | |||
|
27 | 27 | from rhodecode.authentication.routes import root_factory |
|
28 | 28 | from rhodecode.authentication.routes import AuthnRootResource |
|
29 | 29 | from rhodecode.config.routing import ADMIN_PREFIX |
|
30 | from rhodecode.model.settings import SettingsModel | |
|
30 | 31 | |
|
31 | 32 | log = logging.getLogger(__name__) |
|
32 | 33 | |
@@ -50,6 +51,15 b' def _discover_plugins(config, entry_poin' | |||
|
50 | 51 | return _discovered_plugins |
|
51 | 52 | |
|
52 | 53 | |
|
54 | def _discover_legacy_plugins(config, prefix='py:'): | |
|
55 | auth_plugins = SettingsModel().get_setting_by_name('auth_plugins') | |
|
56 | enabled_plugins = auth_plugins.app_settings_value | |
|
57 | legacy_plugins = [id_ for id_ in enabled_plugins if id_.startswith(prefix)] | |
|
58 | ||
|
59 | log.debug('Trying to load these legacy authentication plugins {}'.format( | |
|
60 | legacy_plugins)) | |
|
61 | ||
|
62 | ||
|
53 | 63 | def includeme(config): |
|
54 | 64 | # Set authentication policy. |
|
55 | 65 | authn_policy = SessionAuthenticationPolicy() |
@@ -83,3 +93,4 b' def includeme(config):' | |||
|
83 | 93 | |
|
84 | 94 | # Auto discover authentication plugins and include their configuration. |
|
85 | 95 | _discover_plugins(config) |
|
96 | _discover_legacy_plugins(config) |
General Comments 0
You need to be logged in to leave comments.
Login now