{
  "rules": {
    ".read": false,
    ".write": false,
    "$workspaceID": {
      // TA and student can only be updated by the server.
      "student": {
        ".write": false,
        ".read": false
      },
      "ta": {
        ".write": false,
        ".read": false
      },
      // You must be the TA or student to read or write to a file.
      "files": {
        ".read": "root.child($workspaceID).child('student').val() === auth.uid || root.child($workspaceID).child('ta').val() === auth.uid",
        ".write": "root.child($workspaceID).child('student').val() === auth.uid || root.child($workspaceID).child('ta').val() === auth.uid"
      },
      // Downloads are read-only by clients.
      "downloads": {
        ".read": "root.child($workspaceID).child('student').val() === auth.uid || root.child($workspaceID).child('ta').val() === auth.uid"
      }
    }
  }
}
Add rules for realtime database.
Add rules for realtime database.
