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

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

Gabriel, thanks a lot.

I think I prefer the following implementation for isArray (got it by calling 
jQuery.isArray.toString() in Firebug):

function isArray(obj) {
  return toString.call(obj) === "[object Array]";
}

Any objection?

> 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: users-test2.diff, 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.

Reply via email to