Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

couchdb/pouchdb: how to show and replicate documents for certain users and roles only?

$
0
0

I'm building a collaboration app with couchdb and pouchdb.

I want to implement a calendar feature.

Let's say there is an event like "secret meeting" that involves the users Jessica and James, so the event should have read, update and replicate capabilities only for Jessica and James. Or, let's say, I have an event like "general meeting" that should have read, edit and replicate capabilities only for all current (and FUTURE!) users having the role "office".

I know that there is no per-document-access control in couchdb. I also read about using "proxy servers" but I don't understand how they work.

I read a lot about using "one document per user". How do I keep the documents in-sync in each database, then? I could make a DATABASE for each event, but how do I query for views showing all my events? Do I also have to keep a database-per-role?

This is the most normal use case every web app nowadays has! Think Facebook, think Whatsapp, every chat app.

How should you use couchdb if you can't limit the access to certain documents???


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>