Using MongoDB shell version v5.0.6 and MongoDB compass Version 1.32.5 (1.32.5) (Im not sure if its relevant for the problem tho) .
Im not able to edit Schema validations on any collection in my DB, tried to do that on dbAdmin and readWrite role. what am i doing wrong?
Error when on readWrite role:
not authorized on eyal to execute command { collMod: “transaction”, validator: { $jsonSchema: { required: [ “clientId”], properties: { clientID: { bsonType: “objectId”, description: “Must be a objectId and is required” }, description: } } } }, validationAction: “error”, validationLevel: “strict”, lsid: { id: UUID(“3e1XCJKS-7cd3-4aa9-aac5-89234hdu3983”) }, $clusterTime: { clusterTime: Timestamp(1664562563, 1), signature: { hash: BinData(0, F13A7FB1E1SDFHJKSDFJH2936B435D5DD6C), keyId: 7137234432545796 } }, $db: “eyal” }
When when on DBAdmin role:
not authorized on eyal to execute command { aggregate: “transaction”, pipeline: [ { $match: { $jsonSchema: { required: [ “clientId”], properties: { clientID: { bsonType: “objectId”, description: “Must be a objectId and is required” }} } } } }, { $group: { _id: 1, n: { $sum: 1 } } } ], cursor: {}, lsid: { id: UUID(“ajkshd87921-3a82-4a5f-9e04-0af89jgu2940vb”) }, $clusterTime: { clusterTime: Timestamp(1553478349, 1), signature: { hash: BinData(0, 8F91FSD2234SFJG3455KKNA5B403E969E), keyId: 71376458048657765396 } }, $db: “eyal” }
Thanks in advanced.