From 3bae67489f53ad6501d3632cfa8847b2d09ebaff Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Fri, 8 Jun 2018 17:04:17 +0200 Subject: Relese5.0 merge master 20180608 (#8933) * Add missing diagnostics (#8911) * Update diagnostics.go * Update diagnostics.go * Fix push notification styling backwards compatibility (#8913) * MM-10803: remove premature user sanitization on deactivation (#8926) * remove unused UpdateNonSSOUserActive * MM-10803: stop prematurely sanitizing users on deactivate This change was preceded by the removal of UpdateNonSSOUserActive to ensure there are no APIs relying on the sanitized return value. * MM-10803: test websocket events after UpdateUserActive * MM-10264: Adds system scheme to permissions import/export. (#8924) * MM-10264: Adds system scheme to permissions import/export. * MM-10264: Switches to more likely unique name. * MM-10264: Changed collision prevention string. * MM-10264: Rolls back created schemes in all error cases. * MM-10264: Test fix for more rollback cases. --- app/user.go | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'app/user.go') diff --git a/app/user.go b/app/user.go index c6324eb5f..27e6f347d 100644 --- a/app/user.go +++ b/app/user.go @@ -862,22 +862,6 @@ func (a *App) UpdatePasswordAsUser(userId, currentPassword, newPassword string) return a.UpdatePasswordSendEmail(user, newPassword, T("api.user.update_password.menu")) } -func (a *App) UpdateNonSSOUserActive(userId string, active bool) (*model.User, *model.AppError) { - var user *model.User - var err *model.AppError - if user, err = a.GetUser(userId); err != nil { - return nil, err - } - - if user.IsSSOUser() { - err := model.NewAppError("UpdateActive", "api.user.update_active.no_deactivate_sso.app_error", nil, "userId="+user.Id, http.StatusBadRequest) - err.StatusCode = http.StatusBadRequest - return nil, err - } - - return a.UpdateActive(user, active) -} - func (a *App) UpdateActive(user *model.User, active bool) (*model.User, *model.AppError) { if active { user.DeleteAt = 0 @@ -895,9 +879,6 @@ func (a *App) UpdateActive(user *model.User, active bool) (*model.User, *model.A } ruser := result.Data.([2]*model.User)[0] - options := a.Config().GetSanitizeOptions() - options["passwordupdate"] = false - ruser.Sanitize(options) if !active { a.SetStatusOffline(ruser.Id, false) -- cgit v1.2.3-1-g7c22