Commit ec1f8e0e by Wes Freeman

Merge pull request #17 from kmcgrath/with-auth

Work with admin authentication
parents 7399d012 e5cb2c7a
...@@ -14,6 +14,12 @@ print("Version 1.2.1, released 29 July 2012") ...@@ -14,6 +14,12 @@ print("Version 1.2.1, released 29 July 2012")
var dbs = new Array(); var dbs = new Array();
var emptyDbs = new Array(); var emptyDbs = new Array();
if (typeof db_name === "string") {
db = db.getMongo().getDB( db_name );
}
db.adminCommand('listDatabases').databases.forEach(function(d){ db.adminCommand('listDatabases').databases.forEach(function(d){
if(db.getSisterDB(d.name).getCollectionNames().length > 0) { if(db.getSisterDB(d.name).getCollectionNames().length > 0) {
dbs.push(d.name); dbs.push(d.name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment