temporary extra logging
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
2
main.go
2
main.go
@@ -88,6 +88,7 @@ func GetGroupsOfUser(username string, baseDN string, conn *ldap.Conn) ([]string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
userdn := sr.Entries[0].DN
|
userdn := sr.Entries[0].DN
|
||||||
|
fmt.Printf("userdn is '%s' from CN '%s'", userdn, samAccountName)
|
||||||
|
|
||||||
searchRequest = ldap.NewSearchRequest(
|
searchRequest = ldap.NewSearchRequest(
|
||||||
baseDN,
|
baseDN,
|
||||||
@@ -103,6 +104,7 @@ func GetGroupsOfUser(username string, baseDN string, conn *ldap.Conn) ([]string,
|
|||||||
|
|
||||||
groups := []string{}
|
groups := []string{}
|
||||||
for _, entry := range sr.Entries {
|
for _, entry := range sr.Entries {
|
||||||
|
fmt.Println(entry.GetAttributeValue("cn"))
|
||||||
groups = append(groups, entry.GetAttributeValue("cn"))
|
groups = append(groups, entry.GetAttributeValue("cn"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user