diff --git a/debian/changelog b/debian/changelog index fb48eeed8..cf565ba2c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +yunohost (11.1.1.2) testing; urgency=low + + - group mailalias: the ldap class is in fact mailGroup, not mailAccount -_- (1cb5e43e) + + -- Alexandre Aubin Sat, 03 Dec 2022 15:57:22 +0100 + +yunohost (11.1.1.1) testing; urgency=low + + - Fix again the legacy patch for yunohost user create @_@ (46d6fab0) + + -- Alexandre Aubin Sat, 03 Dec 2022 14:13:09 +0100 + yunohost (11.1.1) testing; urgency=low - groups: add mail-aliases management (#1539) (0f9d9388) 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: