# HG changeset patch # User Johannes Bornhold # Date 2016-06-06 09:24:23 # Node ID 3a278bc43287673d72e9c80517e80114b9f4d89a # Parent 2f0daef258a629291c083f7f32a4f16d7f3cd6b5 authn: Store legacy plugins prefix in module variable. diff --git a/rhodecode/authentication/__init__.py b/rhodecode/authentication/__init__.py --- a/rhodecode/authentication/__init__.py +++ b/rhodecode/authentication/__init__.py @@ -30,8 +30,12 @@ from rhodecode.authentication.routes imp from rhodecode.config.routing import ADMIN_PREFIX from rhodecode.model.settings import SettingsModel + log = logging.getLogger(__name__) +# Legacy plugins are stored with this prefix in 'auth_plugins'. +legacy_plugin_prefix = 'py:' + # TODO: Currently this is only used to discover the authentication plugins. # Later on this may be used in a generic way to look up and include all kinds @@ -52,7 +56,7 @@ def _discover_plugins(config, entry_poin return _discovered_plugins -def _discover_legacy_plugins(config, prefix='py:'): +def _discover_legacy_plugins(config, prefix=legacy_plugin_prefix): """ Function that imports the legacy plugins stored in the 'auth_plugins' setting in database which are using the specified prefix. Normally 'py:' is