{
  "rules": {
    "posts": {
      "$post": {
        ".read": "root.child('users').child(auth.uid).child('clearance-level').val() >= data.child('clearance-level').val()",
        ".write": "root.child('users').child(auth.uid).child('author').val() === true",
        ".validate": "newData.isObject() && newData.hasChild('date')",
        "date": {
          ".validate": "data.parent().exists() === false && newData.val() <= now"
        }
      }
    },
    "flight-routes": {
      "$from": {
        "$to": {
          ".read": "true",
          ".write": "auth.ticketagent === true",
          ".validate": "$from !== $to"
        }
      }
    }
  }
}

{
  "rules": {
    "posts": {
      "$post": {
        ".read": "root.child('users').child(auth.uid).child('clearance-level').val() >= data.child('clearance-level').val()",
        ".write": "root.child('users').child(auth.uid).child('author').val() === true",
        ".validate": "newData.hasChildren() && newData.hasChild('date')",
        "date": {
          ".validate": "data.parent().exists() === false && newData.val() <= now"
        }
      }
    },
    "flight-routes": {
      "$from": {
        "$to": {
          ".read": "true",
          ".write": "auth.ticketagent === true",
          ".validate": "$from !== $to"
        }
      }
    }
  }
}

Fix failing integration test related to the bug
Fix failing integration test related to the bug
