AZ206: A key written wrongly, or of the wrong shape
A type's key is its table's primary key: id bigint unless written after the table, type folder = app.folders (folder_no) or (id uuid). A composite key names each column, (org_id, slug text), of integers, text or uuid. A type that signs in (the user type, principals) has a key of one column. A relation to a type with a composite key gives its columns in brackets: page : doc = [org_id, doc_slug].
Reported when the policy is compiled: rowfence check, the editor, rowfence dev.
The mistake
authz
app role app_user
type user = app.users
type folder = app.folders (id bigint uuid)
owner : user = owner_id
can view = ownerline 3: write the key as (column [type]), or (col1 [type], col2 [type]) for a composite key [AZ206]Fixed
authz
app role app_user
type user = app.users
type folder = app.folders (id uuid)
owner : user = owner_id
can view = owner