I have readWrite role which supposed to give me the ability to use findAndModify()
, which works when I connect to my mongo (4.2) machine, but from my app (play framework scala app using reactive mongo ver 0.18.8) I get the following error message:
"exception":"play.api.libs.json.JsResultException: JsResultException(errors:List((,List(JsonValidationError(List(CommandError[code=13, errmsg=not authorized on myServiceName to execute command { findAndModify: \"events\", query: { status: \"READY\", retries: { $lt: 5 }, lockedUntil: { $lt: new Date(1574066602281) } }, bypassDocumentValidation: true, writeConcern: { w: 1, j: false }, upsert: false, update: { $set: { lockedUntil: new Date(1574066722281) }, $inc: { retries: 1 } }, new: true, $db: \"myServiceName\" }