insertAndFindTransactions role doesn't work/execute

I execute the below code, but it doesn’t work/execute :

mongo admin --port 27000 --username 'globalAdminUser' --password '5xd49$4%0bef#6c&b*d'
use admin
db.createRole(
   {
     role: "insertAndFindTransactions",
     privileges: [
       { resource: { db: "transaction", collection: "" }, actions: [ "find", "insert" ] }
     ],
     roles: []
   }
)

Hello @Vishal_20733 welcome to the community! :wave:

You have a typo in your db name, should be all ok when you fix it.

For future questions, it is better to create a new post instead of extending an existing actually solved post.
You always can link to the other post telling that it is similar but does not solve your issue due to xxx

Best of luck for the next sessions
Michael

1 Like