Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2160

Outdated addUser() example in the 2.5.3 documentation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • Affects Version/s: None
    • Component/s: manual

      Some of the given examples on the userAdd manual page are outdated and don't work on 2.5.3. To reproduce one example:

      db.addUser( { user: "<user>", userSource: "<database>", roles: [<roles>] } )
      

      The userSource field is not a valid field anymore in addUser. I believe that you now must switch to the database where the user's credentials should be delegated, then add the user from there (and this only works for $external, too).

      use $external
      db.addUser( { user: "<user>", roles: [<roles>] } )
      

            Assignee:
            bgrabar Bob Grabar
            Reporter:
            luke.lovett Luke Lovett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              10 years, 40 weeks, 4 days ago