Skip to content

AZ203: A relation or permission that isn't there ​

An expression (in a permission, a rule or an invariant), a type#relation subject or a test names a relation or permission the type doesn't have (a test names a permission). The message lists what it has; declare the missing one, or fix the name. A shared by permission that isn't there is AZ207, a scope's AZ404, and custom roles' from relation AZ211.

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

The mistake ​

authz
app role app_user
type user = app.users
type folder = app.folders
  owner : user = owner_id
  can view = owner or viewer
line 5: folder has no relation or permission 'viewer' (it has: owner, view) [AZ203]

Fixed ​

authz
app role app_user
type user = app.users
type folder = app.folders
  owner  : user = owner_id
  viewer : user = app.folder_viewers(folder_id -> user_id)
  can view = owner or viewer