jstests/auth/currentop_cursors_auth.js
// Create one root user and one regular user on the given connection.
Create one root user and one regular user on the given connection.
Create one root user and one regular user on the given connection .
function createUsers(conn) {
    const adminDB = conn.getDB("admin");
    adminDB.createUser({user: "ted", pwd: pass, roles: ["root"]});
    assert(adminDB.auth("ted", pass), "Authentication 1 Failed");
    adminDB.createUser({user: "yuta", pwd: pass, roles: ["readWriteAnyDatabase"]});
}
function createUsers ( conn ) { const adminDB = conn . getDB ( "admin" ) ; adminDB . createUser ( { user : "ted" , pwd : pass , roles : [ "root" ] } ) ; assert ( adminDB . auth ( "ted" , pass ) , "Authentication 1 Failed" ) ; adminDB . createUser ( { user : "yuta" , pwd : pass , roles : [ "readWriteAnyDatabase" ] } ) ; }
Create one root user and one regular user on the given connection.
Create one root user and one regular user on the given connection .