From d1c5c5237594fa9e9a33f4b0380fbfac24a1367b Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Fri, 3 Jun 2016 15:02:08 +0200 Subject: [PATCH] authn: Log a warning message if fallback authentication plugin is enabled in ini file. --- rhodecode/authentication/registry.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rhodecode/authentication/registry.py b/rhodecode/authentication/registry.py index 78e8090d..85d15ca8 100644 --- a/rhodecode/authentication/registry.py +++ b/rhodecode/authentication/registry.py @@ -76,8 +76,12 @@ class AuthenticationPluginRegistry(object): plugins.append(plugin) # Add the fallback plugin from ini file. - plugin = self.get_plugin(self._fallback_plugin) - if plugin is not None and plugin not in plugins: - plugins.append(plugin) + if self._fallback_plugin: + log.warn( + 'Using fallback authentication plugin from INI file: "%s"', + plugin.get_id()) + plugin = self.get_plugin(self._fallback_plugin) + if plugin is not None and plugin not in plugins: + plugins.append(plugin) return plugins