redgeoff / delta-pouch

Conflict-free collaborative editing for PouchDB
196 stars 13 forks source link

Document rights related question #40

Open trokster opened 9 years ago

trokster commented 9 years ago

Hi, I like the concept. How would you handle write/edit rights on docs in a one database per user setup ? Filtered reps would bounce the main data object from one db to the other, the only way I would see is to copy the "security" field onto the delta and let that replicate. Server daemon would do the clean up, discard whatever changes do not qualify and even keep a history if required.

redgeoff commented 9 years ago

If I understand your idea correctly, I think you would indeed need design documents that are replicated between different couchdb instances. Unless I am mistaken, you'd want to read/write the design docs outside of delta-pouch.

aesculus commented 9 years ago

Maybe this is a different question but sounds similar: I want to not only consider rights but also date/timestamps. For example if two updates with the same fields get posted to individual db's and then are synched out of sequence. I would like to post both for historical reasons but have the latest be the current value.

I supposed today I could do that via the change function and compare the values and if it was in the wrong order post a new update with the most recent. Nicer to have the plugin do this.