Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronize user data via /users endpoint #1157

Closed
eloquence opened this issue Oct 13, 2020 · 4 comments · Fixed by #1397
Closed

Synchronize user data via /users endpoint #1157

eloquence opened this issue Oct 13, 2020 · 4 comments · Fixed by #1397
Labels
enhancement New feature or request

Comments

@eloquence
Copy link
Member

Once freedomofpress/securedrop-sdk#131 is merged and an updated SDK is released, we can use the new /users endpoint added in SecureDrop 1.6.0 to keep the client's user DB in sync (as part of a regular sync), instead of relying on other information, such as the attribution of replies, to infer that a user should be added to or removed from the client database. This should also help to resolve #1143.

@eloquence eloquence added the enhancement New feature or request label Oct 13, 2020
@eloquence
Copy link
Member Author

We don't expect to resolve yet during the 10/28-11/12 sprint, but will do an initial technical investigation & scoping (1-2 hours max).

@eloquence
Copy link
Member Author

Given the number of areas of the code where this is relevant (replies, seen data, login badge), this is not a small issue, so during the 11/12-11/25 @creviera and I will focus on finalizing scope and test plan/acceptance criteria.

@sssoleileraaa
Copy link
Contributor

I think this issue should be addressed in this order: #1143 (comment)

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Dec 16, 2020

I edited #1143 (comment) by adding step 0 to the task order, which gets us half way there towards user sync. Once we resolve user deletion issues server side we entirely resolve this issue (in step 5).

The benefit to getting half-way there with syncing on user creation is that we can begin implementing the seen-by feature at the per-message level. Currently we're blocked on working on this feature because we rely on the replies sync to create users, and not all users have sent a reply. Kudos to @eloquence for bringing this to my attention and coming up with this idea.

So to get half-way there on synchronizing user data, we need to:

  • Remove the current code that creates users from the replies sync
  • Add a /users sync at the beginning of the MetadataSyncJob, which should also ensure that a "deleted" user is account is created, whether or not a user has ever been deleted, ensuring no error when later syncing replies with the "deleted" UUID association
  • Make sure there are no regressions - eveything should look and feel the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants