authn: Add docstring to function that discovers legacy plugins.

This commit is contained in:
Johannes Bornhold 2016-06-06 10:49:40 +02:00
parent a8d92f8858
commit 8906d7163b

View file

@ -53,6 +53,11 @@ def _discover_plugins(config, entry_point='enterprise.plugins1'):
def _discover_legacy_plugins(config, prefix='py:'):
"""
Function that imports the legacy plugins stored in the 'auth_plugins'
setting in database which are using the specified prefix. Normally 'py:' is
used for the legacy plugins.
"""
auth_plugins = SettingsModel().get_setting_by_name('auth_plugins')
enabled_plugins = auth_plugins.app_settings_value
legacy_plugins = [id_ for id_ in enabled_plugins if id_.startswith(prefix)]