Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-790

validate_doc_update on the _users database fails

    XMLWordPrintableJSON

Details

    • Regular Contributors Level (Easy to Medium)

    Description

      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.

      Attachments

        1. usersTest.diff
          3 kB
          Gabriel Farrell
        2. users-test2.diff
          4 kB
          Gabriel Farrell

        Activity

          People

            fdmanana Filipe David Borba Manana
            cliffstanford Cliff Stanford
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified