create custom role with list of collection
currently, when creating a role, we need to list one collection per db for custom role
db.getSisterDB('admin').createRole({role : 'readWriteCollectionXY',
privileges : [ {resource : {db : "databaseA", collection : "***"}, actions : ["find", "insert", "update"]},
{resource : {db : "databaseA", collection : "yyy"}, actions : ["find", "insert", "update"]} ],
roles : []
})
having an option to list all the collections in one db with the same permission would be a nice thing to have.
db.getSisterDB('admin').createRole({role : 'readWriteCollectionXY',
privileges : [ {resource : {db : "database_A", collections : ["***", "yyy"] }, actions : ["find", "insert", "update"]} ],
roles : []
})