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:
stonezdj 2018-06-12 19:17:02 +08:00
parent 255a6d6f95
commit f025f28d12

View File

@ -101,6 +101,7 @@ func (uga *UserGroupAPI) Post() {
}
if len(result) > 0 {
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
ldapGroup, err := auth.SearchGroup(userGroup.LdapGroupDN)