Skip to content

Remove docs once client looses access to them #117

@TheSlimvReal

Description

@TheSlimvReal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage / Analysis

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions