outposts/ldap: fix type assertion after upgrading to new API Client

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-05-27 14:28:26 +00:00
parent 5f04a187ea
commit a03dde8a90
3 changed files with 23 additions and 24 deletions

View File

@ -36,13 +36,12 @@ func ldapResolveTypeSingle(in interface{}) *string {
}
}
func AKAttrsToLDAP(attrs interface{}) []*ldap.EntryAttribute {
func AKAttrsToLDAP(attrs map[string]interface{}) []*ldap.EntryAttribute {
attrList := []*ldap.EntryAttribute{}
if attrs == nil {
return attrList
}
a := attrs.(*map[string]interface{})
for attrKey, attrValue := range *a {
for attrKey, attrValue := range attrs {
entry := &ldap.EntryAttribute{Name: attrKey}
switch t := attrValue.(type) {
case []string: