feat: can assign default group during signup (#3633)

This commit is contained in:
DacongDA
2025-03-02 22:55:51 +08:00
committed by GitHub
parent 9032865e60
commit 85ca318e2f
3 changed files with 45 additions and 2 deletions

View File

@ -249,6 +249,10 @@ func (c *ApiController) Signup() {
user.Groups = []string{invitation.SignupGroup}
}
if application.DefaultGroup != "" && user.Groups == nil {
user.Groups = []string{application.DefaultGroup}
}
affected, err := object.AddUser(user)
if err != nil {
c.ResponseError(err.Error())