Just a quick question re user accounts in mongodb.
I have the following user configured in the admin database:
> use admin
switched to db admin
> db.system.users.find({ user : "foobar_admin"}).pretty()
{
"_id" : ObjectId("52024f53e513b080573d59de"),
"otherDBRoles" : {
"test" : [
"dbAdmin",
"readWrite"
]
},
"pwd" : "<pwdhash>",
"roles" : [
"read"
],
"user" : "foobar_admin"
}
>
and the following user configured on the test database
> use test
switched to db test
> db.system.users.find({ user : "abc_admin"}).pretty()
{
"_id" : ObjectId("52024f97e513b080573d59e1"),
"pwd" : "<pwdhash>",
"roles" : [
"readWrite"
],
"user" : "foobar_admin"
}
>
Do the permissions set in the admin database override those set in the test database? IE, does the foobar_admin have dbAdmin and readWrite on the test database? does one document have precedence over the other?