mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 12:15:20 +01:00
Add ldap_group_dn parameter to search group with ldap group dn
Fixes #15171 Cannot use q.Query because ldap_group_dn contains comma(,) and equal(=), which are reserved characters in q.Query Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
parent
b789674ada
commit
fcd2fbcfe7
@ -2697,6 +2697,11 @@ paths:
|
||||
- usergroup
|
||||
parameters:
|
||||
- $ref: '#/parameters/requestId'
|
||||
- name: ldap_group_dn
|
||||
in: query
|
||||
type: string
|
||||
required: false
|
||||
description: search with ldap group DN
|
||||
responses:
|
||||
'200':
|
||||
description: Get user group successfully.
|
||||
|
@ -109,6 +109,9 @@ func (u *userGroupAPI) ListUserGroups(ctx context.Context, params operation.List
|
||||
switch authMode {
|
||||
case common.LDAPAuth:
|
||||
query.GroupType = common.LDAPGroupType
|
||||
if params.LdapGroupDn != nil && len(*params.LdapGroupDn) > 0 {
|
||||
query.LdapGroupDN = *params.LdapGroupDn
|
||||
}
|
||||
case common.HTTPAuth:
|
||||
query.GroupType = common.HTTPGroupType
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user