Answer the question
In order to leave comments, you need to log in
How to change system.roles MongoDb collection?
Good day!
In the database - admin, there is a collection - system.roles, the document in which I need to edit. It looks like this:
{
"_id" : "admin.AuthAppRole",
"role" : "AuthAppRole",
"db" : "admin",
"privileges" : [
{
"resource" : {
"db" : "publicName",
"collection" : "testApp"
},
"actions" : [
"insert"
]
}
],
"roles" : [
{
"role" : "readWrite",
"db" : "Auth"
},
{
"role" : "dbAdmin",
"db" : "Auth"
}
]
{
"_id" : "admin.***",
"userId" : ***,
"user" : "***",
"db" : "admin",
"roles" : [
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "readWrite",
"db" : "admin"
},
{
"role" : "read",
"db" : "admin"
},
{
"role" : "dbAdmin",
"db" : "admin"
},
{
"role" : "readAnyDatabase",
"db" : "admin"
},
{
"role" : "readWriteAnyDatabase",
"db" : "admin"
},
{
"role" : "dbAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "userAdmin",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
}
],
"mechanisms" : [
"***",
"***"
]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question