Commit 6e552b9d authored by Christopher Speller's avatar Christopher Speller Committed by Derrick Anderson

Fix sanitization on websocket user edit events. (#8557)

parent 25d5a35e
......@@ -930,6 +930,8 @@ func (a *App) UpdateActive(user *model.User, active bool) (*model.User, *model.A
}
}
a.sendUpdatedUserEvent(*ruser)
return ruser, nil
}
}
......@@ -950,7 +952,7 @@ func (a *App) UpdateUserAsUser(user *model.User, asAdmin bool) (*model.User, *mo
return nil, err
}
a.sendUpdatedUserEvent(*updatedUser, asAdmin)
a.sendUpdatedUserEvent(*updatedUser)
return updatedUser, nil
}
......@@ -968,7 +970,7 @@ func (a *App) PatchUser(userId string, patch *model.UserPatch, asAdmin bool) (*m
return nil, err
}
a.sendUpdatedUserEvent(*updatedUser, asAdmin)
a.sendUpdatedUserEvent(*updatedUser)
return updatedUser, nil
}
......@@ -997,8 +999,8 @@ func (a *App) UpdateUserAuth(userId string, userAuth *model.UserAuth) (*model.Us
return userAuth, nil
}
func (a *App) sendUpdatedUserEvent(user model.User, asAdmin bool) {
a.SanitizeProfile(&user, asAdmin)
func (a *App) sendUpdatedUserEvent(user model.User) {
a.SanitizeProfile(&user, false)
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_USER_UPDATED, "", "", "", nil)
message.Add("user", user)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment