LandsOfHope / LandsOfHope.Data

Open Data Commons Open Database License v1.0
0 stars 1 forks source link

Add blacklist/whitelist type reference validation for client/server events #206

Open etinquis opened 9 months ago

etinquis commented 9 months ago

At 'build' time, I want to determine if any client events reference types that should not be exposed to clients.

As an example, no events that get sent to the client should reference account ids, as this should be private information.

fun check(client-events, types-blacklist) {
  for(event in client-events) {
    // recursive, into refs:
    for(ref in event.references) {
      if(types-blacklist.has(ref)) {
        // fail validation
      }
    }
  }
}