I
Define
Build a policy from a fluent, type-safe PolicyBuilder API to create a PolicyDefinition
II
Encode
A PolicyDefinition is a simple JSON encodeable object. Ship it to a browser, a mobile client, or a service in another language
III
Apply
Read the PolicyDefinition into a Policy and quickly check permissions
Policy Definitionv1.0
version: "1.0"
rules:
- [allow, Create, Article]
- [allow, Update, Article, { owner_id: 1 }]
- [deny, Delete, Article, { status: { $not: "archived" } }]