I'm setting up my new RocketChat Server.
The problem is that actually, Rocket Chat doesn't support CAS Account if they are not created by CAS.
We have old accounts.
I can add the CAS feature by doing this :
Enter in the MongoDB Database with MongoDB Compass software on Windows, and add cas object in services object with my keyboard...
https://i.stack.imgur.com/weLuk.png
So as you can see I can add the CAS feature by doing this.
I want to do that with code so I did this :
1 - Enter in rocketchat_mongo docker
2 - Connect with admin login and use rocketchat database
3 - Execute this code
db.users.update({"name":"Fabien Rousseau"},{ $set: {"services" : { "cas" : { "external_id" : "fabien.rousseau", "version" : 2 }}}})
The command is OK because CAS object is added in services, BUT, it delete the other object like password and resume...
I just want to add CAS object without deleting other objects...
My expected result is in the first image : account with CAS.
Actually after the command I have this :
https://i.stack.imgur.com/hkJoe.png
Please help me to tune my command to avoid deleting other objects in my services object.