mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-04 01:30:15 +01:00
Remove dup call to createGroupSearchFilter in searchGroup
Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
parent
3dbe6a44cd
commit
69c6aa6927
@ -371,11 +371,7 @@ func (session *Session) SearchGroupByDN(groupDN string) ([]models.LdapGroup, err
|
||||
if _, err := goldap.ParseDN(groupDN); err != nil {
|
||||
return nil, ErrDNSyntax
|
||||
}
|
||||
ldapFilter, err := createGroupSearchFilter(session.ldapGroupConfig.LdapGroupFilter, "", session.ldapGroupConfig.LdapGroupNameAttribute)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
groupList, err := session.searchGroup(groupDN, ldapFilter, "", session.ldapGroupConfig.LdapGroupNameAttribute)
|
||||
groupList, err := session.searchGroup(groupDN, session.ldapGroupConfig.LdapGroupFilter, "", session.ldapGroupConfig.LdapGroupNameAttribute)
|
||||
if serverError, ok := err.(*goldap.Error); ok {
|
||||
log.Debugf("resultCode:%v", serverError.ResultCode)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user