I am going to have my collections named as 'a', 'a.b', 'a.b.c'... in the format of a package names. I want to create roles in mongodb like below,
db.createRole(
{
role: "regexAccess",
privileges: [
{ resource: { db: "scriptrepo", collection: "a.*" }, actions: [ "find","update","insert","remove" ] }
],
roles: []
}
)
Is it possible to do such a thing in MongoDB?