Allow system admins to switch user accounts to email/password (#2893)

Этот коммит содержится в:
Joram Wilander
2016-05-05 16:36:42 -04:00
коммит произвёл Christopher Speller
родитель d2ddf40f56
Коммит f2e788f4b1
5 изменённых файлов: 60 добавлений и 23 удалений

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

@@ -1702,7 +1702,7 @@ func ResetPassword(c *Context, userId, newPassword string) *model.AppError {
user = result.Data.(*model.User)
}
if len(user.AuthData) != 0 {
if len(user.AuthData) != 0 && !c.IsSystemAdmin() {
return model.NewLocAppError("ResetPassword", "api.user.reset_password.sso.app_error", nil, "userId="+user.Id)
}