Skip to content

Conversation

@pstokkink
Copy link
Contributor

@pstokkink pstokkink commented Oct 16, 2025

This adds basic functionality to schema tools to parse the rowLevelAuth property from a table schema.

Locally this works in tandem with the POC draft PR in DSO-API.

Here is the example schema that I used.

{
  "id": "rls",
  "type": "table",
  "version": "1.5.2",
  "lifecycleStatus": "stable",
  "auth": [
    "OPENBAAR"
  ],
  "rowLevelAuth": {
    "source": "adresAfgeschermd",
    "targets": ["straat", "huisnummer", "postcode", "plaats", "telefoon.thuis"],
    "authMap": {
      "true": ["FP/MDW"],
      "false": []
    }
  },
  "schema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "additionalProperties": false,
    "identifier": [
      "identificatie"
    ],
    "required": [
      "schema",
      "identificatie"
    ],
    "display": "identificatie",
    "properties": {
      "schema": {
        "$ref": "https://schemas.data.amsterdam.nl/[email protected]#/definitions/schema"
      },
      "identificatie": {
        "type": "string",
        "title": "ID"
      },
      "straat": {
        "type": "string",
        "title": "Straat",
        "description": "straat van het adres"
      },
      "postcode": {
        "type": "string",
        "title": "Postcode",
        "description": "postcode van het adres"
      },
      "plaats": {
        "type": "string",
        "title": "Plaats",
        "description": "plaats van het adres"
      },
      "huisnummer": {
        "type": "integer",
        "description": "huisnummer van het adres"
      },
      "telefoon": {
        "type": "object",
        "properties": {
          "thuis": {
            "type": "string"
          },
          "werk": {
            "type": "string"
          }
        }
      },
      "adresAfgeschermd": {
        "type": "boolean",
        "description": "bepaalt of het adres geheim is"
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant