Hi Team,
What is command to create user and provide access at collection level.
I know at DB level we can provide as below:
use reporting
db.createUser(
{
user: “reportsUser”,
pwd: “12345678”,
roles: [
{ role: “read”, db: “reporting” },
{ role: “read”, db: “products” },
{ role: “read”, db: “sales” },
{ role: “readWrite”, db: “accounts” }
]
}
)
But if we need provide readwrite access only at certain collection.
Regards,
Vishwanath