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

Remove docs once client looses access to them #117

Open
TheSlimvReal opened this issue Oct 18, 2023 · 0 comments
Open

Remove docs once client looses access to them #117

TheSlimvReal opened this issue Oct 18, 2023 · 0 comments

Comments

@TheSlimvReal
Copy link
Contributor

In the scenario where a client A has access to a doc X. If another client B now edits doc X so that client A does not have permissions to read the new version of X, then currently no new change is send to client A and this client keeps holding the old version of X without receiving any updates.

What we would like to have is that somehow client A gets notified about loosing permissions to doc X so that it can be remove/purged on the client side.

A rather simple approach would be to instead of completely filtering out docs to which clients do not have access to instead send reduced docs that only hold the information that the user does not have access to these docs.
e.g.

{
  "_id": "Doc:X",
  "_rev": "1-some_change",
  "missingPermissions": true
}

On the client side we could then listen to all changes and purge all docs where missingPermissions is true.

The downside of this approach is the quite big additional load as this will mean that first all docs are synced all the time and then only later the docs have to be removed on the client side. Currently we have the advantage that only a subset of docs is synced to the clients.

At the moment I cannot think of a straight forward approach to find out on the server side if a "purge instruction" needs to be sent to the client side, e.g. when a client looses access.

@TheSlimvReal TheSlimvReal changed the title Remove docs once client uses access to them Remove docs once client looses access to them Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage / Analysis
Development

No branches or pull requests

1 participant