jstests/auth/change_stream_pre_image_coll_role_auth.js
// Helper to authenticate and login the user on the provided connection.
Helper to authenticate and login the user on the provided connection.
Helper to authenticate and login the user on the provided connection .
function login(conn, userName) {
    const user = users[userName];
    const db = conn.getDB(user.db);
    assert(db.auth(userName, password));
    return db;
}
function login ( conn , userName ) { const user = users [ userName ] ; const db = conn . getDB ( user . db ) ; assert ( db . auth ( userName , password ) ) ; return db ; }
Helper to authenticate and login the user on the provided connection.
Helper to authenticate and login the user on the provided connection .