couchperuser icon indicating copy to clipboard operation
couchperuser copied to clipboard

Feature Request Ability to create Multiple "Private" or "Shared" databases per user

Open jspenc72 opened this issue 11 years ago • 3 comments

jspenc72 avatar Dec 01 '14 22:12 jspenc72

If someone submits a pull request that implements it then I'll review it. It's currently feature complete as far as my needs go, although I do definitely see the value in such a feature (at least to optionally create a private/public database pair).

etrepum avatar Dec 02 '14 00:12 etrepum

No option to configure, however...

I added a 'sofaperuser'

https://github.com/jspenc72/couchperuser-livingroom

I call it, "living room".

your documents get to sit on the couch, but your friends' docs (public docs) are on the sofa...

Used the old version of your repo without your latest changes because i think is allows for better separation of code for public vs private couch perusers

If you can see a better method for implementing this with your new version please let me know.

jspenc72 avatar Jan 01 '15 21:01 jspenc72

I don't really understand why you think the old code makes this better, the new code would be even easier to extend for this purpose. You could just change it to take the list of properties to modify as an argument to ensure_security ([<<"admins">>, <<"members">>] for the private db, [<<"admins">>] for the public one) and then there's almost no duplicated code other than creating two databases instead of one.

For compatibility it would make sense to leave the naming scheme for the private database alone, and have a different prefix for the public database (userdb- and userdb-pub- perhaps). Having a configuration option to enable the public database would make sense, although it might not be so bad to just have this on by default.

Do you really want the database to be writable by anyone? It seems like it might be better from a security perspective for this database to be publicly readable but privately writable.

etrepum avatar Jan 06 '15 08:01 etrepum