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