From ebc06f1abe59f2a3ec9ab36dc095a7bd6e00b354 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 22 Sep 2021 13:19:50 +0200 Subject: [PATCH] outposts/ldap: fix logic error Signed-off-by: Jens Langhammer --- internal/outpost/ldap/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/outpost/ldap/utils.go b/internal/outpost/ldap/utils.go index 7014116aa..a2167a5ee 100644 --- a/internal/outpost/ldap/utils.go +++ b/internal/outpost/ldap/utils.go @@ -149,10 +149,10 @@ func (pi *ProviderInstance) ensureAttributes(attrs []*ldap.EntryAttribute, shoul } func (pi *ProviderInstance) mustHaveAttribute(attrs []*ldap.EntryAttribute, name string, value []string) []*ldap.EntryAttribute { - shouldSet := false + shouldSet := true for _, attr := range attrs { if attr.Name == name { - shouldSet = true + shouldSet = false } } if shouldSet {