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

[SERVER] Improve createUser documentation

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual, Server
    • None

    Description

      In createUser doc we are missing an example where we show how to create an user with specific role on only one collection:

      db.createUser({user: "foo",pwd:"foo",roles:[{role: "readWrite",db: "test",collection: "coll"}]})
      

      We also should document that the role subdocument can contain the field collection

      Attachments

        Activity

          People

            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            renato.riccio@mongodb.com Renato Riccio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 21 weeks ago