Commit Graph
233 Commits
Author SHA1 Message Date
Antonio Scandurra 49d7b4bc12 Allow specifying query, limit and page when hitting /api/users
This is needed to introduce pagination and search in our admin panel.
2022-06-13 17:30:01 +02:00
Antonio Scandurra fe1a861bf3 Expose a new POST /api/bulk_users API to create many users at once
This API will accept a vector of JSON entries containing the GitHub login,
the email address and the invite count. If that user already exist, the
invite count will be updated to the new one.
2022-06-13 15:18:18 +02:00
Nathan Sobo 6ed503fe6e Implement get_invite_code_for_user on test db 2022-05-23 18:07:23 -06:00
Nathan SoboandMax Brunsfeld 51a61cc485 Don't assign invite code when updating count from 0 to 0
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-23 17:28:05 -06:00
Nathan Sobo 7a8ff5abd7 Accept an optional email address when creating new users 2022-05-20 20:25:21 -06:00
Antonio ScandurraandNathan Sobo b751156cd7 Rename first_connection to connected_once
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:35:00 +02:00
Antonio Scandurra d8ee4378c9 Send a ShowContacts message the first time a user connects to collab 2022-05-20 15:47:14 +02:00
Nathan SoboandAntonio Scandurra a3bbabaaac Add ability to get the user for an invite code in collab API
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-19 12:35:07 -06:00
Nathan SoboandAntonio Scandurra 3d7e912c6b Enable descriptive HTTP errors to be returned from DB layer
For now, we only use this when redeeming an invite code.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-19 11:55:55 -06:00
Nathan Sobo d1b7a249b4 WIP 2022-05-19 11:09:44 -06:00
Nathan SoboandAntonio Scandurra 7e2d1fefc4 Add ability to update invite count to collab API
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-18 10:23:08 -06:00
Nathan SoboandAntonio Scandurra cfb31067a5 Add invite codes / counts to users table
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-18 09:56:37 -06:00
a5fd664b00 Add the ability to notify when a user accepts a contact request
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-05-11 18:51:40 +02:00
Max Brunsfeld 334f246df3 Include every user in their own list of contacts 2022-05-10 14:05:07 -07:00
Antonio ScandurraandNathan Sobo b00338195e Make user fuzzy search case-insensitive
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-10 17:30:09 +02:00
Max BrunsfeldandNathan Sobo b8aba0972d Wait until contacts have been cleared when disconnecting
Also, use an mpsc for UpdateContacts messages, not a watch, since
the messages now represent changes instead of snapshots.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-09 17:23:39 -07:00
Max Brunsfeld 0533a0bd3c Allow users to remove contact relationships that they initiated 2022-05-09 16:31:30 -07:00
Nathan SoboandMax Brunsfeld e3ee19b123 Wire up UI for requesting contacts and cancelling requests
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 11:24:05 -06:00
Nathan Sobo 9b1b61355a Fully test contact request acceptance
* Be sure we send updates to multiple clients for the same user
* Be sure we send a full contacts update on initial connection

As part of this commit, I fixed an issue where we couldn't disconnect and reconnect in tests. The first disconnect would cause the I/O future to terminate asynchronously, which caused us to sign out even though the active connection didn't belong to that future. I added a guard to ensure that we only sign out if the I/O future is associated with the current connection.
2022-05-08 15:19:56 -06:00
Nathan Sobo 5d20338f69 Get basic test of accepting a contact request passing 2022-05-07 15:09:27 -06:00
Nathan Sobo 93dae88cac WIP: Fix compile errors by commenting stuff out 2022-05-07 14:04:13 -06:00
Nathan Sobo 4f06dca78b WIP: Update contacts based on deltas rather than snapshots 2022-05-06 20:50:59 -06:00
Max BrunsfeldandNathan Sobo 8a3425477f Start work on RPC endpoints for dealing with contact requests
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-06 15:44:47 -07:00
Max BrunsfeldandNathan Sobo 274c4c244c Implement persistence for contacts
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-06 13:33:23 -07:00
Max Brunsfeld 35fea43089 Adjust fuzzy search to avoid filtering based on edit distance threshold 2022-05-05 12:43:38 -07:00
Nathan Sobo 6050e0ead7 Add fuzzy_search_users to Db trait, PostgresDb 2022-05-05 09:58:18 -06:00
Nathan SoboandAntonio Scandurra 1fe964ac16 Start moving from logging to tracing on collab server
Install some spans. Probably more work to do here.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-28 09:45:59 -06:00
Nathan SoboandMax Brunsfeld 1293b21b2d Get db tests passing with Tokio Postgres adaptor
We now run tests that interact with the real database under a Tokio reactor. We make the tests run multi-threaded so we can block on the main thread on database teardown and still make progress actually tearing down the DB.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-26 13:30:21 -06:00
Nathan SoboandAntonio Scandurra 2adb9fe472 Get zed.dev working with new collab backend
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-26 11:15:41 -06:00
Nathan SoboandAntonio Scandurra 447c1d2f71 WIP: Get compiling with Tokio by commenting almost everything
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-22 13:33:19 -06:00
Nathan Sobo 396e4ba17b Remove signups-related methods from Db trait 2022-04-21 10:55:32 -06:00
Nathan Sobo 9f83417b58 Remove more files supporting the old web front-end 2022-04-21 09:06:34 -06:00
Nathan Sobo ab8204368c Rename zed-server to collab
Over time, I think we may end up having multiple services, so it seems like a good opportunity to name this one more specifically while the cost is low. It just seems like naming it "zed" and "zed-server" leaves it a bit open ended.
2022-04-09 08:30:42 -06:00