diff --git a/internal/outpost/ldap/utils.go b/internal/outpost/ldap/utils.go index 7014116aad..a2167a5eec 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 {