<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:51:42 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[DOCS-6138] Comment on: &quot;manual/reference/system-users-collection.txt&quot;</title>
                <link>https://jira.mongodb.org/browse/DOCS-6138</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;var MongoClient = require(&apos;mongodb&apos;).MongoClient;&lt;br/&gt;
MongoClient.connect(url, function(err, db) {&lt;br/&gt;
   var adminDb = db.admin();&lt;br/&gt;
   adminDb.addUser(&apos;admin&apos;, &apos;password&apos;, {&lt;br/&gt;
            roles:[&lt;br/&gt;
              &lt;/p&gt;
{ role: &apos;userAdmin&apos;, db: &apos;admin&apos; }
&lt;p&gt;,&lt;br/&gt;
              &lt;/p&gt;
{ role: &apos;userAdminAnyDatabase&apos;, db: &apos;admin&apos; }
&lt;p&gt;,&lt;/p&gt;
              { role: &quot;readWrite&quot;, db: &quot;PMDB&quot; }
&lt;p&gt;            ]});&lt;br/&gt;
}&lt;br/&gt;
I can add the account successfully, but I cannot use the mongoose to connect the &quot;PMDB&quot; with admin account. I don&apos;t know why...&lt;/p&gt;

&lt;p&gt;var connection = mongoose.connect(&apos;mongodb://admin:password@127.0.0.1:27017/PMDB&apos;);&lt;/p&gt;
</description>
                <environment>Windows 10&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;http://docs.mongodb.org/manual/reference/system-users-collection/&quot;&gt;http://docs.mongodb.org/manual/reference/system-users-collection/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240&lt;br/&gt;
*Referrer*: &lt;a href=&quot;http://docs.mongodb.org/manual/reference/built-in-roles/&quot;&gt;http://docs.mongodb.org/manual/reference/built-in-roles/&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 1366 x 768&lt;br/&gt;
*repo*: docs&lt;br/&gt;
*source*: reference/system-users-collection&lt;br/&gt;
</environment>
        <key id="228277">DOCS-6138</key>
            <summary>Comment on: &quot;manual/reference/system-users-collection.txt&quot;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="415413233@qq.com">Roger Luo</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Thu, 3 Sep 2015 12:12:17 +0000</created>
                <updated>Fri, 3 Nov 2017 11:18:26 +0000</updated>
                            <resolved>Sun, 6 Sep 2015 18:07:38 +0000</resolved>
                                                    <fixVersion>01112017-cleanup</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1023159" author="kay.kim@10gen.com" created="Sun, 6 Sep 2015 18:07:38 +0000"  >&lt;p&gt;Hi, &lt;br/&gt;
the user &quot;admin&quot; is defined in the admin database (i.e. the authenticationDatabase is admin database). And the user &quot;admin&quot; has roles in PMDB as well as admin, but the authenticationDatabase for this user is admin.  So, once you authenticate the admin user against the admin database, you can switch database to PMDB and do read/write.&lt;/p&gt;

&lt;p&gt;You might find &lt;a href=&quot;http://stackoverflow.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;StackOverflow&lt;/a&gt; a better forum for questions like these as DOCS tickets are mainly to report issues with the manual.&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Kay Kim&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 6 Sep 2015 18:07:38 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 23 weeks, 3 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 23 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
            <customfieldvalue>415413233@qq.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrq48v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hscwbj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrzkfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>