The _users
database is a great place to store information about users. The design of the documents is relaxed, so I would not worry about adding fields. (Removing some could be risky though.) You could consider adding an object in the document for all your data:
{ "_id": "org.couchdb.user:jhs"
, "_rev": "3-281e87af31d7d8277463732dccc06f65"
, "name": "jhs"
, "type": "user"
, "roles": ["whatever"]
// (etc.)
, "myapp":
{ "profile_photo": "http://example.com/some_photo.png"
, "favorite_color": "blue"
}
}
The one thing you want to check is the validate_doc_update
function in _design/_auth
. Make sure it is not going to prevent you from doing what you need. Currently (probably indefinitely) it does not check any attributes in the document besides those it needs (type
, name
, roles
, etc.).
Just remember that these documents are world-readable. Per-user private data should go in a per-user private database.