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

POST _session responds with name: null if _admin user and no _users doc present

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.1, 2.0.0, 1.6.1
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      When logging in with admin credentials (and no corresponding _users doc, if that is important), the response of the POST to _session has the name property set to null:

      {"ok":true,"name":null,"roles":["_admin"]}

      It should be the name of the admin instead, like it does when logging in with a standard user:

      {"ok":true,"name":"standarduser","roles":[]}

      Requesting the _session object after logging in with an admin, the name is proper set:

      {"ok":true,"userCtx":

      {"name":"adminuser","roles":["_admin"]}

      ,"info":{"authentication_db":"_users","authentication_handlers":["oauth","cookie","default"],"authenticated":"cookie"}}

      Johannes

        Attachments

          Activity

            People

            • Assignee:
              robertkowalski Robert Kowalski
              Reporter:
              jjs Johannes J. Schmidt
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: