Skip to content

AZ101: A line the language doesn't read ​

A policy is made of blocks that start at the left margin (app role, type, rules, scope, caveat, invariants, test, include) and indented lines that belong to the block above them. This line is neither: a word no block starts with (often a typo), or an indented line with no block above it in its file (a block ends at an include line, and an included file starts blocks of its own). An include line starts at the left margin too: it includes a whole file, not lines of the block above. A line that starts with the right word but goes on wrongly is told how that line is written: write types as: ..., or test "name" with the name in double quotes.

Reported when the policy is compiled: rowstile check, the editor, rowstile dev.

The mistake ​

authz
app role app_user
type user = app.users
typ folder = app.folders
  owner : user = owner_id
  can view = owner
line 3: expected 'app role', 'type', 'rules', 'scope', 'caveat', 'sync', 'invariants', 'test', 'test "name"' or 'include', got: typ folder = app.folders [AZ101]

Fixed ​

authz
app role app_user
type user = app.users
type folder = app.folders
  owner : user = owner_id
  can view = owner