* add tests

* pass userID to the function instead of the user object.

* remove concurrent login simulation

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Vishal
2024-10-22 12:21:36 +05:30
коммит произвёл GitHub
родитель 1a28bc2c58
Коммит cc5b3a2f69
9 изменённых файлов: 129 добавлений и 11 удалений

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

@@ -216,6 +216,11 @@ func (s *LocalCacheUserStore) GetProfileByIds(ctx context.Context, userIds []str
return users, nil
}
func (s *LocalCacheUserStore) UpdateFailedPasswordAttempts(userID string, attempts int) error {
s.InvalidateProfileCacheForUser(userID)
return s.UserStore.UpdateFailedPasswordAttempts(userID, attempts)
}
// Get is a cache wrapper around the SqlStore method to get a user profile by id.
// It checks if the user entry is present in the cache, returning the entry from cache
// if it is present. Otherwise, it fetches the entry from the store and stores it in the