|
|
|
|
|
by y0ghur7_xxx
3617 days ago
|
|
Managing rights for users on document level granularity was pretty easy in 1.6. A simple js function (it's called a "design document") to handle the logic and you are done. Just an example: function(newDoc, oldDoc, userCtx) {
if (userCtx.roles.indexOf('can-write-sessions') !== -1 || userCtx.roles.indexOf('admin') !== -1) {
return;
} else {
throw ({
forbidden: 'can-write-sessions role missing'
});
}
}
Why do you think that the Couchbase Sync Gateway is better? |
|
Couchbase's channels allow you to segregate docs with different read (or write) rights inside the same db.