Policies
A Policy is a set of rules which allows or denies certain actions to certain resources, based on certain conditions. A policy always consists of the following elements:
Effect - whether the policy denies or allows the action
Action - which action is this policy for. For example read, create, update, delete, etc.
Resources - the Plate functionality names that the policy is about. E.g. attachments, or content types. These functionality names are notated in PlateID format. Go to the Resources page to learn more.
Conditions - the conditions under which the policy takes effect. For example, the policy only takes effect if the site_id of the resource in question is equal to 1234. Go to the Conditions page to learn more.
Policies are notated as JSON. Check out an example:
{
"version": 1,
"statement": {
"effect": "allow",
"action": "create",
"resources": "plateid://Base/Attachment",
"conditions": {
"number": {
"==": {"object.site_id": 1234}
}
"string": {
"==": {"subject.email": "test@email.com"}
}
}
}
}