You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Marcello Nuccio <ma...@gmail.com> on 2011/09/20 14:47:02 UTC

Arguments of validate_doc_update().

Looking at the source code[1], I understand that `validate_doc_update`
functions are called with four arguments, instead of three as
documented on the wiki[2] and the "Definitive Guide"[3].

If I understand it correctly, the fourth argument is the security
object of the database. Is it correct?. It's OK for you if I update
the wiki[2] with this information?

Thanks,
  Marcello

[1]: https://github.com/apache/couchdb/blob/trunk/src/couchdb/couch_query_servers.erl#L225
[2]: http://wiki.apache.org/couchdb/Document_Update_Validation
[3]: http://guide.couchdb.org/draft/validation.html

Re: Arguments of validate_doc_update().

Posted by Marcello Nuccio <ma...@gmail.com>.
It can be quite useful in a few cases to avoid hard-coded names or
roles in validate_doc_update functions.

I have update the wiki with this information.

Thanks for the info,
  Marcello

2011/9/20 Alexander Shorin <kx...@gmail.com>:
> Hi!
>
> Yes this is database security object and this argument was added with
> 0.11.1 release. For Javascript missing secObj is not critical, but for
> others it could produce a lot of happy debugging hours, because it had
> been nowhere officially described(:
>
> --
> ,,,^..^,,,
>
>
>
> On Tue, Sep 20, 2011 at 4:47 PM, Marcello Nuccio
> <ma...@gmail.com> wrote:
>> Looking at the source code[1], I understand that `validate_doc_update`
>> functions are called with four arguments, instead of three as
>> documented on the wiki[2] and the "Definitive Guide"[3].
>>
>> If I understand it correctly, the fourth argument is the security
>> object of the database. Is it correct?. It's OK for you if I update
>> the wiki[2] with this information?
>>
>> Thanks,
>>  Marcello
>>
>> [1]: https://github.com/apache/couchdb/blob/trunk/src/couchdb/couch_query_servers.erl#L225
>> [2]: http://wiki.apache.org/couchdb/Document_Update_Validation
>> [3]: http://guide.couchdb.org/draft/validation.html
>>
>

Re: Arguments of validate_doc_update().

Posted by Alexander Shorin <kx...@gmail.com>.
Hi!

Yes this is database security object and this argument was added with
0.11.1 release. For Javascript missing secObj is not critical, but for
others it could produce a lot of happy debugging hours, because it had
been nowhere officially described(:

--
,,,^..^,,,



On Tue, Sep 20, 2011 at 4:47 PM, Marcello Nuccio
<ma...@gmail.com> wrote:
> Looking at the source code[1], I understand that `validate_doc_update`
> functions are called with four arguments, instead of three as
> documented on the wiki[2] and the "Definitive Guide"[3].
>
> If I understand it correctly, the fourth argument is the security
> object of the database. Is it correct?. It's OK for you if I update
> the wiki[2] with this information?
>
> Thanks,
>  Marcello
>
> [1]: https://github.com/apache/couchdb/blob/trunk/src/couchdb/couch_query_servers.erl#L225
> [2]: http://wiki.apache.org/couchdb/Document_Update_Validation
> [3]: http://guide.couchdb.org/draft/validation.html
>