From da8417a1412610690908252575acfa38e8c1f802 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 4 Jul 2021 18:10:39 +0200 Subject: [PATCH] outposts/ldap: re-add old fields for backwards compatibility Signed-off-by: Jens Langhammer --- outpost/pkg/ldap/instance_search.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/outpost/pkg/ldap/instance_search.go b/outpost/pkg/ldap/instance_search.go index 01c500702..34cfb3f6c 100644 --- a/outpost/pkg/ldap/instance_search.go +++ b/outpost/pkg/ldap/instance_search.go @@ -99,6 +99,11 @@ func (pi *ProviderInstance) UserEntry(u api.User) *ldap.Entry { } attrs = append(attrs, &ldap.EntryAttribute{Name: "memberOf", Values: pi.GroupsForUser(u)}) + + // Old fields for backwards compatibility + attrs = append(attrs, &ldap.EntryAttribute{Name: "accountStatus", Values: []string{BoolToString(*u.IsActive)}}) + attrs = append(attrs, &ldap.EntryAttribute{Name: "superuser", Values: []string{BoolToString(u.IsSuperuser)}}) + attrs = append(attrs, &ldap.EntryAttribute{Name: "goauthentik.io/ldap/active", Values: []string{BoolToString(*u.IsActive)}}) attrs = append(attrs, &ldap.EntryAttribute{Name: "goauthentik.io/ldap/superuser", Values: []string{BoolToString(u.IsSuperuser)}})