Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas
Created by Guest
Created on Oct 16, 2019

MongoError: user is not allowed to do action [listCollections] on [db.]

NodeJS mongodb driver (with or without mongoose) needs to "listCollections" before "createCollection" But "listCollections" and "createCollection" are in different "rights list" for custom role (look screenshots) In this case "createCollection" in "Collection Actions" has no sense without "listCollections" from another rights scope "Database Actions and Roles" and user with "createCollection" ability in fact cannot create collection It can be fixed with moving "createCollection" and "listCollections" rights into one scope
  • Attach files
  • Guest
    Nov 4, 2019
    Hey Oleksii, Thank you for the feedback! I hear you that the way we've structured the groupings for various actions isn't intuitive in this case. I hope that in this case, you were able to leverage the search at the top of the dropdown to quickly find the action you wanted. For what it's worth, the groupings you see for Custom Roles is mapped to how one would define privileged actions under the hood: https://docs.mongodb.com/manual/reference/privilege-actions/#listCollections - if you're ever in a similar situation in the future, hopefully this can serve as helpful reference.