Complete the code to grant the read role to a user on the database.
db.createUser({user: "reportUser", roles: ["[1]"]})The read role allows the user to read data from the database but not modify it.
Complete the code to grant the readWrite role to a user on the database.
db.createUser({user: "appUser", roles: ["[1]"]})The readWrite role allows the user to read and write data on the database.
Fix the error in the code to grant the dbAdmin role to a user.
db.createUser({user: "adminUser", roles: ["[1]"]})The dbAdmin role allows the user to perform administrative tasks on the database, such as creating indexes.
Fill both blanks to create a user with readWrite and dbAdmin roles.
db.createUser({user: "managerUser", roles: ["[1]", "[2]"]})The user needs both readWrite to modify data and dbAdmin to manage the database.
Fill all three blanks to create a user with read, readWrite, and dbAdmin roles.
db.createUser({user: "fullAccessUser", roles: ["[1]", "[2]", "[3]"]})This user has all three main built-in roles: read, readWrite, and dbAdmin for full access and management.