mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-23 16:11:24 +01:00
If the LDAP user group already exist return 409 when onboarding an LDAP group
Do not adding the LDAP user group again.
This commit is contained in:
parent
255a6d6f95
commit
f025f28d12
@ -101,6 +101,7 @@ func (uga *UserGroupAPI) Post() {
|
|||||||
}
|
}
|
||||||
if len(result) > 0 {
|
if len(result) > 0 {
|
||||||
uga.HandleConflict("Error occurred in add user group, duplicate user group exist.")
|
uga.HandleConflict("Error occurred in add user group, duplicate user group exist.")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
// User can not add ldap group when the ldap server is offline
|
// User can not add ldap group when the ldap server is offline
|
||||||
ldapGroup, err := auth.SearchGroup(userGroup.LdapGroupDN)
|
ldapGroup, err := auth.SearchGroup(userGroup.LdapGroupDN)
|
||||||
|
Loading…
Reference in New Issue
Block a user