fix
This commit is contained in:
@@ -46,7 +46,7 @@ func (l *Ldap) Delete(DN string) error {
|
||||
}
|
||||
|
||||
// 查询资源(分组/用户)
|
||||
func (l *Ldap) Search(DN, filter string, attr []string, controls []ldap.Control) (resp *ldap.SearchResult, err error) {
|
||||
func (l *Ldap) Search(DN string, scope int, filter string, attr []string, controls []ldap.Control) (resp *ldap.SearchResult, err error) {
|
||||
if filter == "" {
|
||||
rootCn := strings.Split(l.rootDN, ",")
|
||||
if len(rootCn) == 0 {
|
||||
@@ -56,7 +56,7 @@ func (l *Ldap) Search(DN, filter string, attr []string, controls []ldap.Control)
|
||||
}
|
||||
searchRequest := ldap.NewSearchRequest(
|
||||
DN,
|
||||
ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
|
||||
scope, ldap.NeverDerefAliases, 0, 0, false,
|
||||
filter,
|
||||
attr,
|
||||
controls,
|
||||
|
||||
Reference in New Issue
Block a user