mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 06:03:45 +01:00
Merge pull request #5121 from stonezdj/fix_5096
If group already exist return 409 when adding a LDAP user group
This commit is contained in:
commit
05c5cbc227
@ -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