couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-790) validate_doc_update on the _users database fails
Date Sat, 20 Nov 2010 13:16:14 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934138#action_12934138
] 

Filipe Manana commented on COUCHDB-790:
---------------------------------------

Gabriel,

Thanks for the patch.

However, I would prefer that you create an "isArray" function in the view server so that it
can be reused by any validate doc update function (or map, or reduce, or list, etc).

Don't forget to add it to the sandbox (check init_sandbox() in share/server/*.js).

> validate_doc_update on the _users database fails
> ------------------------------------------------
>
>                 Key: COUCHDB-790
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-790
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Cliff Stanford
>         Attachments: usersTest.diff
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> The validate_doc_update on the users database contains the following code:
> if ((oldDoc || newDoc).type != 'user') {
> throw({forbidden : 'doc.type must be user'});
> } // we only validate user docs for now
> However the effect of this is that a user may change his type *from* "user" but not back
again.  I don't think this is what was intended.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message