use tidy;
db.createRole(
   {
     role: "tidyOpRole",
     privileges: [
       { 
           resource: { db: "tidy", collection: "" }, 
           actions: [ 
               "collStats", 
               "convertToCapped", 
               "createCollection", 
               "dbHash", 
               "dbStats", 
               "dropCollection", 
               "createIndex", 
               "dropIndex", 
               "emptycapped", 
               "find", 
               "insert", 
               "killCursors", 
               "listIndexes", 
               "listCollections", 
               "remove", 
               "renameCollectionSameDB", 
               "update" ] 
       }
     ],
     roles: []
   }
);

db.createUser(
    { 
        user:"tidy", 
        pwd:"111111", 
        roles:[
            "tidyOpRole"
        ]
    }
);

@@ -71,25 +71,24 @@
 : %5B%0A       %7B
- 
 %0A           
@@ -128,17 +128,16 @@
 n: %22%22 %7D,
- 
 %0A       
@@ -150,17 +150,16 @@
 tions: %5B
- 
 %0A       
@@ -174,25 +174,24 @@
 %22collStats%22,
- 
 %0A           
@@ -208,25 +208,24 @@
 rtToCapped%22,
- 
 %0A           
@@ -239,33 +239,32 @@
 eateCollection%22,
- 
 %0A               
@@ -272,17 +272,16 @@
 dbHash%22,
- 
 %0A       
@@ -298,17 +298,16 @@
 bStats%22,
- 
 %0A       
@@ -331,17 +331,16 @@
 ection%22,
- 
 %0A       
@@ -357,25 +357,24 @@
 reateIndex%22,
- 
 %0A           
@@ -389,17 +389,16 @@
 pIndex%22,
- 
 %0A       
@@ -419,17 +419,16 @@
 capped%22,
- 
 %0A       
@@ -442,17 +442,16 @@
  %22find%22,
- 
 %0A       
@@ -467,17 +467,16 @@
 insert%22,
- 
 %0A       
@@ -497,17 +497,16 @@
 ursors%22,
- 
 %0A       
@@ -527,17 +527,16 @@
 ndexes%22,
- 
 %0A       
@@ -561,17 +561,16 @@
 ctions%22,
- 
 %0A       
@@ -586,17 +586,16 @@
 remove%22,
- 
 %0A       
@@ -627,17 +627,16 @@
 SameDB%22,
- 
 %0A       
@@ -653,17 +653,16 @@
 pdate%22 %5D
- 
 %0A       
@@ -715,17 +715,16 @@
 r(%0A    %7B
- 
 %0A       
@@ -736,17 +736,16 @@
 :%22tidy%22,
- 
 %0A       
@@ -758,17 +758,16 @@
 111111%22,
- 
 %0A       
@@ -811,16 +811,112 @@
      %5D%0A    %7D%0A);%0A
+%0A// create Index%0A%0Adb.user.ensureIndex(%7B%22email%22: 1%7D);%0A%0Adb.checkin.ensureIndex(%7B%22timestamp%22: 1%7D);%0A

update mongo.js