Automatic Merge
Этот коммит содержится в:
Mattermost Build
2026-01-22 07:18:51 +02:00
коммит произвёл GitHub
родитель 43e797010b
Коммит 3b1b8d9114
8 изменённых файлов: 55 добавлений и 309 удалений

Просмотреть файл

@@ -127,6 +127,12 @@ func createTeam(c *Context, w http.ResponseWriter, r *http.Request) {
}
// Don't sanitize the team here since the user will be a team admin and their session won't reflect that yet
// instead check the scheme roles for the team and if the user has the permission to invite users
_, schemeUserRole, schemeAdminRole, schemeErr := c.App.GetSchemeRolesForTeam(rteam.Id)
if schemeErr != nil || !c.App.RolesGrantPermission([]string{schemeUserRole, schemeAdminRole}, model.PermissionInviteUser.Id) {
// If we can't check permissions, fail secure by hiding the invite_id because the team is already created above
rteam.InviteId = ""
}
auditRec.Success()
auditRec.AddEventResultState(&team)