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

Access Control / Permissions #642

Open
MentalGear opened this issue Feb 15, 2024 · 2 comments
Open

Access Control / Permissions #642

MentalGear opened this issue Feb 15, 2024 · 2 comments

Comments

@MentalGear
Copy link

A very fine project!
I'm new to OT/CRDT, and I was wondering how/if a (central) user/role/group permission based access control can be added?

For example, for a Notes PoC. Also, how would conflicts like these be handled?

  • Member C adds a note Test. Member D opens it.
  • Member D disconnects X
  • Member C sets the note Test to private (not accessible by D)
  • Member D makes edits on note Test, and various other edits to other notes
  • Member D reconnects to the server
@alecgibson
Copy link
Collaborator

You would just return a sensible error code to Member D and handle that client-side (show some alert for example), just as with a traditional HTTP API.

@curran
Copy link
Contributor

curran commented Feb 18, 2024

If you put access control rules in the middleware on the server, the changes from Member D will be sent to the server but not actually ever applied to the document.

See the docs here: https://share.github.io/sharedb/middleware/op-submission#apply

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

No branches or pull requests

3 participants