use gaming

db.createUser({
    user: "readOnlyUser",
    pwd: "readOnly123",  
    roles: [
        { role: "read", db: "gaming" }
    ]
})

use admin

db.createUser({
    user: "readWriteUser",
    pwd: "readWrite123",  
    roles: [
        { role: "readWrite", db: "gaming" }
    ]
})

use admin
db.system.users.find({}, {user: 1, db: 1, roles: 1})