Question

I'd like to make user creation public, so that unauthenticated users can create new accounts in _users, but only give read privileges to admin roles. Is this possible? How?

Was it helpful?

Solution

CouchDB 1.1.0 and the upcoming 1.1.1 do not support this. The best you can do is to have a public database where users submit requests to create user accounts, and you have a standalone tool to react to that and create normal user accounts. (The standalone tool could simply be a dedicated web page you log in to as the admin.)

I have submitted a patch to do exactly what you describe. Called the CouchDB inbox database, it allows unprivileged users to write some approved documents to the database, but they cannot read any of the data. Creating new user accounts is exactly why I made the patch.

I am optimistic that it will be included in either v1.2 or 1.3.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top