Add functionality to update password with password hash (#15343)

* Add functionality to update password with password hash

This can be used to update a user's password with a direct password
hash instead of providing the password in plaintext.

* Use test helper for local mode
Этот коммит содержится в:
Gabe Jackson
2020-08-26 11:28:00 -04:00
коммит произвёл GitHub
родитель e83462637e
Коммит 90ef61f74c
19 изменённых файлов: 243 добавлений и 137 удалений

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

@@ -946,6 +946,8 @@ type AppIface interface {
UpdateEphemeralPost(userId string, post *model.Post) *model.Post
UpdateGroup(group *model.Group) (*model.Group, *model.AppError)
UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError)
UpdateHashedPassword(user *model.User, newHashedPassword string) *model.AppError
UpdateHashedPasswordByUserId(userId, newHashedPassword string) *model.AppError
UpdateIncomingWebhook(oldHook, updatedHook *model.IncomingWebhook) (*model.IncomingWebhook, *model.AppError)
UpdateLastActivityAtIfNeeded(session model.Session)
UpdateMfa(activate bool, userId, token string) *model.AppError