Is the purpose of this to just save adding a validate_doc_update that throws if doc._user != userCtx.name?
B. On 27 April 2011 11:31, Benoit Chesneau <[email protected]> wrote: > hi all, > > more and more I'm adding for validation purpose an author property == > couchdb username in my docs . This is always the user connected and > I'm currenty asking myself if we couldn't do it automatically on doc > save/update. > > We could add a _user member to the doc and have its value equal to > name field in the user_ctx. So we can validate against it and compare > with the db security object in validation functions. What do you think > about it ? > > - benoît >
