From 1cb5e43e7eb50356078411088b5d7cbf99224744 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Dec 2022 15:56:41 +0100 Subject: [PATCH] group mailalias: the ldap class is in fact mailGroup, not mailAccount -_- --- src/user.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/user.py b/src/user.py index 2fcd8ab9f..8cf79c75f 100644 --- a/src/user.py +++ b/src/user.py @@ -1242,11 +1242,11 @@ def user_group_update( logger.info(m18n.n("group_update_aliases", group=groupname)) new_attr_dict["mail"] = set(new_group_mail) - if new_attr_dict["mail"] and "mailAccount" not in group["objectClass"]: - new_attr_dict["objectClass"] = group["objectClass"] + ["mailAccount"] - elif not new_attr_dict["mail"] and "mailAccount" in group["objectClass"]: + if new_attr_dict["mail"] and "mailGroup" not in group["objectClass"]: + new_attr_dict["objectClass"] = group["objectClass"] + ["mailGroup"] + if not new_attr_dict["mail"] and "mailGroup" in group["objectClass"]: new_attr_dict["objectClass"] = [ - c for c in group["objectClass"] if c != "mailAccount" + c for c in group["objectClass"] if c != "mailGroup" and c != "mailAccount" ] if new_attr_dict: