couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: doc `_user` member proposal
Date Wed, 27 Apr 2011 10:54:20 GMT
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 <bchesneau@gmail.com> 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
>

Mime
View raw message