You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Cliff Stanford (JIRA)" <ji...@apache.org> on 2010/06/10 13:57:14 UTC

[jira] Created: (COUCHDB-790) validate_doc_update on the _users database fails

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


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.


[jira] Commented: (COUCHDB-790) validate_doc_update on the _users database fails

Posted by "Gabriel Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929349#action_12929349 ] 

Gabriel Farrell commented on COUCHDB-790:
-----------------------------------------

The test for an array on "roles" is also incorrect. I'll work on a patch for the test suite.

> 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
>   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.


[jira] Updated: (COUCHDB-790) validate_doc_update on the _users database fails

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-790:
--------------------------------------

    Skill Level: Regular Contributors Level (Easy to Medium)

> 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
>   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.


[jira] Commented: (COUCHDB-790) validate_doc_update on the _users database fails

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878585#action_12878585 ] 

Jan Lehnardt commented on COUCHDB-790:
--------------------------------------

Can you create a test case in form of a patch to the JavaScript test suite?

> 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
>   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.