##// END OF EJS Templates
authn: Store legacy plugins prefix in module variable.
johbo -
r132:3a278bc4 default
parent child Browse files
Show More
@@ -30,8 +30,12 b' from rhodecode.authentication.routes imp'
30 from rhodecode.config.routing import ADMIN_PREFIX
30 from rhodecode.config.routing import ADMIN_PREFIX
31 from rhodecode.model.settings import SettingsModel
31 from rhodecode.model.settings import SettingsModel
32
32
33
33 log = logging.getLogger(__name__)
34 log = logging.getLogger(__name__)
34
35
36 # Legacy plugins are stored with this prefix in 'auth_plugins'.
37 legacy_plugin_prefix = 'py:'
38
35
39
36 # TODO: Currently this is only used to discover the authentication plugins.
40 # TODO: Currently this is only used to discover the authentication plugins.
37 # Later on this may be used in a generic way to look up and include all kinds
41 # Later on this may be used in a generic way to look up and include all kinds
@@ -52,7 +56,7 b' def _discover_plugins(config, entry_poin'
52 return _discovered_plugins
56 return _discovered_plugins
53
57
54
58
55 def _discover_legacy_plugins(config, prefix='py:'):
59 def _discover_legacy_plugins(config, prefix=legacy_plugin_prefix):
56 """
60 """
57 Function that imports the legacy plugins stored in the 'auth_plugins'
61 Function that imports the legacy plugins stored in the 'auth_plugins'
58 setting in database which are using the specified prefix. Normally 'py:' is
62 setting in database which are using the specified prefix. Normally 'py:' is
General Comments 0
You need to be logged in to leave comments. Login now