mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-15947: Prevents new user creation with invite link to group-constrained team. (#11023)
This commit is contained in:
@@ -104,6 +104,10 @@ func (a *App) CreateUserWithInviteId(user *model.User, inviteId string) (*model.
|
||||
}
|
||||
team := result.Data.(*model.Team)
|
||||
|
||||
if team.IsGroupConstrained() {
|
||||
return nil, model.NewAppError("CreateUserWithInviteId", "app.team.invite_id.group_constrained.error", nil, "", http.StatusForbidden)
|
||||
}
|
||||
|
||||
user.EmailVerified = false
|
||||
|
||||
ruser, err := a.CreateUser(user)
|
||||
|
||||
Reference in New Issue
Block a user