feat: support assign a default group for synchronized from external openldap (#3140)

* feat: support default sync group for ldap (with without add i18n translate)

* feat: improve translation

* feat: update all i18n translation

* revert: remove new i18n translation
This commit is contained in:
DacongDA
2024-08-24 00:12:52 +08:00
committed by GitHub
parent adc63ea726
commit 1460a0498f
3 changed files with 47 additions and 3 deletions

View File

@ -339,6 +339,10 @@ func SyncLdapUsers(owner string, syncUsers []LdapUser, ldapId string) (existUser
Ldap: syncUser.Uuid,
}
if ldap.DefaultGroup != "" {
newUser.Groups = []string{ldap.DefaultGroup}
}
affected, err := AddUser(newUser)
if err != nil {
return nil, nil, err