This PR removes the database access in the `Authorization` header
verification in Collab.
We already have the user returned from the call to Cloud, but were just
fetching the user from the database to get some additional fields.
We're now returning the additional fields we need from Cloud, so we can
just convert the user from the internal API response into a `User`
entity.
Closes CLO-762.
Release Notes:
- N/A
This PR replaces the `TransitionalUserService` with the
`CloudUserService`, as all of the calls are now all going through Cloud.
This allows us to delete the `TransitionalUserService`, the
`DatabaseUserService`, as well as the backing database queries that are
no longer used.
Closes CLO-758.
Release Notes:
- N/A
This PR makes it so we route the `UserService::search_channel_members`
call through Cloud instead of hitting the database.
This is the last of the calls to be routed through Cloud. We'll clean up
the old database-backed implementations in a follow-up PR.
Closes CLO-746.
Release Notes:
- N/A
This PR makes it so we route the `UserService::fuzzy_search_users` call
through Cloud instead of hitting the database.
Closes CLO-745.
Release Notes:
- N/A
This PR makes it so we route the `UserService::get_user_by_github_login`
call through Cloud instead of hitting the database.
Closes CLO-743.
Release Notes:
- N/A
This PR makes it so we route the `UserService::get_users_by_ids` call
through Cloud instead of hitting the database.
We've introduced a new `CloudUserService` that will fetch the users from
Cloud using the internal API. Note that we've only implemented the
`get_users_by_ids` method on this service, as the endpoints for the
other methods don't yet exist.
We have also introduced a `TransitionalUserService` for the purposes of
gradually transitioning these calls over to Cloud. Right now it uses the
`CloudUserService` for the `get_users_by_ids` implementation, but then
uses the `DatabaseUserService` for the other methods.
Closes CLO-740.
Release Notes:
- N/A
This PR introduces a `UserService` trait to Collab.
This is a step towards moving Collab away from reading user information
directly from the database.
We currently have two implementations for the trait:
- The `DatabaseUserService`, which leverages the existing query methods
to talk to the database
- The `FakeUserService`, which will be used in tests
Once we're ready, we'll be able to replace the `DatabaseUserService`
with a `CloudUserService` to fetch the users from Cloud.
Release Notes:
- N/A