From 30f901a044bb83aa1296757f334958d571317e5a Mon Sep 17 00:00:00 2001 From: Isman Firmansyah Date: Wed, 6 Dec 2023 14:06:14 +0700 Subject: [PATCH] fix(docker-jans-persistence-loader): passing CN_SCIM_ENABLED doesn't toggle jansScimEnabled config (#6952) Signed-off-by: iromli --- docker-jans-persistence-loader/scripts/upgrade.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-jans-persistence-loader/scripts/upgrade.py b/docker-jans-persistence-loader/scripts/upgrade.py index 9e958acdf63..6b61aee6eb2 100644 --- a/docker-jans-persistence-loader/scripts/upgrade.py +++ b/docker-jans-persistence-loader/scripts/upgrade.py @@ -817,6 +817,11 @@ def update_config(self): entry.attrs["jansSmtpConf"][0] = json.dumps(new_smtp_conf) should_update = True + scim_enabled = as_boolean(os.environ.get("CN_SCIM_ENABLED", False)) + if as_boolean(entry.attrs["jansScimEnabled"]) != scim_enabled: + entry.attrs["jansScimEnabled"] = scim_enabled + should_update = True + if should_update: self.backend.modify_entry(entry.id, entry.attrs, **kwargs)