MongoDB Atlas Realm Rules on documents in collections sometimes not working

{   "%%user.custom_data.is_admin": true }

is causing server error and

{   "user.custom_data.is_deactivated": false }

is causing that all users can only list themselves. Expected behaviour is that this rule is only affectting user who does not have set is_deactivated in his custom data. There are other modifications using null and $in, but all of them are causing unexpected behaviour.

Hi @kulXtreme_N_A ,

It’s difficult to determine what may be wrong with limited information, and the snippets you posted don’t tell much by themselves.

Ideally, we should be able to access the configuration (not the data!) of the app affected to check, and possibly query you for further details, but of course, if you don’t have a Support contract that would give you a direct channel, it wouldn’t be wise to share in a public forum that info.

The only alternative, then, is for you to give here all the information you can, for example (but not limited to)

  • Are you using Device Sync? Partition-based or Flexible?
  • In which panel did you set the rules?
  • Can you post the rules in full, not just snippets?
  • What’s the exact content of custom_data, and the schema it’s expected to comply with? Can you post a sample?
  • As usual, can you please state the issue in the typical template
    • Initial conditions
    • Steps to reproduce
    • Expected result
    • Actual result