Hi I read about two ways for implementing per-document read access for couchapps:
- Each user gets his own database which contains only data this user is allowed to read. Then all users write to a master database that replicates to all user databases using a replication filter that decides who can read what.
- Using list functions to filter the output of other views and to restrict access via a proxy server and a whitelist.
I have some questions about this:
Are there more possibillities to acieve read access on document level?
How do i create a users private database in a couchapp? i do need admin rights for that but a user who fills out the signUp form of my application clearly can't have admin rights. do i need a middle-layer (php etc...) for the signup process so that i can create the database needed?
When i finally have this database i need to start continous replication using a filter. somewhere i read that such replications are not resumed when the server is rebooted. do i need a chronjob that recreates these replications ever x hours for the case that the server crashes??
isn't that a huge waste of disk space? most of the data gets duplicated for every user that registers for my application or am i wrong? (especially if there is only little information that must not be read by others)