From 00a29f3d8840e285cc17e6d929d7616715612110 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 1 Jul 2019 21:45:35 +0200 Subject: [PATCH] Check for change before encoding --- cps/admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index c641f3a0..9c08d2d4 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -413,12 +413,13 @@ def configuration_helper(origin): goodreads=goodreads_support, title=_(u"Basic Configuration"), page="config") else: - content.config_use_ldap = 1 + content.config_login_type = 1 content.config_ldap_provider_url = to_save["config_ldap_provider_url"] content.config_ldap_port = to_save["config_ldap_port"] content.config_ldap_schema = to_save["config_ldap_schema"] content.config_ldap_serv_username = to_save["config_ldap_serv_username"] - content.config_ldap_serv_password = base64.b64encode(to_save["config_ldap_serv_password"]) + if content.config_ldap_serv_password != to_save["config_ldap_serv_password"]: + content.config_ldap_serv_password = base64.b64encode(to_save["config_ldap_serv_password"]) content.config_ldap_dn = to_save["config_ldap_dn"] content.config_ldap_user_object = to_save["config_ldap_user_object"] reboot_required = True