TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

Add administrator flag in configuration #180

Closed Crandel closed 5 years ago

Crandel commented 6 years ago

Hi, I try to use mongo hacker with my project, but I`m not an administrator in MongoDB, just a regular user and I got this error message each time I run any query

QUERY    [thread1] Error: profile command failed: {
  "ok": 0,
  "errmsg": "not authorized on ibp to execute command { profile: -1.0 }",
  "code": 13
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.getProfilingStatus@src/mongo/shell/db.js:290:1

It would be nice if I just change one field in configuration and any helper function will know that profiling is not available. Thanks

stennie commented 5 years ago

This will be resolved via the fix for #195.