On Feb 23, 2013, at 1:24 AM, Benoit Chesneau <[email protected]> wrote:
> if you can use another couchdh then rcouch [1] has the module > couch_dbupdates [2] which ahs been specifically done for that purpose. > > Also in rcouch you have the view changes [3] wich allows you to get > notifications when the index is updated. This is a real view changes > and not the current hack in couchdb, all sequences are incrementally > indexed. This view changes allows you to make efficient filtered > replications without the need of having one db/user. I dont understand why you would need filtered replication if you were using one db for all users. Filtered replication by views would come in handy if you were indeed replicating to one db/user. One db/user also requires you to keep information about the users in the documents. If a user's rights changes, then the database needs to go through a normalization. This would get real heavy if the db is huge and rights change frequently. In addition, all views would need to contain this additional level of indexing. > You can also > validate reads [4] if you need it. Same as above, the docs need to carry around the users they are assigned to. Another way to go about it is to update the validate function every time user rights changes. But that smells. Best, Stephen Bartell > > Not to say that rcouch is fully compatible and based on couchdb 1.3. > I'm actively working on porting the rcouch core to couchdb. > > Hope it helps, > > - benoƮt > > > [1] http://rcouch.org > [2] https://github.com/refuge/couch_dbupdates > [3] https://github.com/refuge/rcouch/wiki/View-Changes > [4] https://github.com/refuge/rcouch/wiki/Validate-documents-on-read > > On Fri, Feb 22, 2013 at 9:46 PM, Jeff Charette <[email protected]> wrote: >> Does anyone know how setup database per user in a couch app? Wouldn't this >> just give admin access to the main db? >> >> I am trying to setup up a basic user signup, then give them protected docs. >> I have it working for a whole database, but ran into trouble with >> attachments. Many have also warned of the security issues of protecting >> your docs with secure_rewrites. >> >> I'm stuck and thanks for all your time. >> >> Jeff Charette | Principal >> We Are Charette >> web / identity / packaging >> >> m 415.298.2707 >> w wearecharette.com >> e [email protected]
