Edit a policy
Change a policy's permission statements, or look at a system policy.
Where: Membership → Policies → click a policy · /projects/<project>/membership/policies/<policyId>/edit
Before you start
The policy exists — see Create a policy. System policies open read only.
You need the
membership:updatepermission on policies.
Steps
Under Custom Policies, click the policy, for example
orders-read. The screen Editing policy opens with the saved document. It now has apidkey with the policy id (pol_1oRlzIGnF3lzemVoX1nwyy) — leave it in place.
The saved document. Change the document, for example add the
invoicescollection toresourcesand changedescription.KeyWhat you changeExampledescriptionThe text.
Read every order and invoice in the database.permissions[].resourcesAdd or remove items.
…:database:collection:invoices
The changed document, valid. Press Save.
A System policy opens as Displaying system policy: the document is shown as a read only tree, with Cancel only.

Result
Cloud goes back to Policies. The new permissions apply at once to every role — and through the roles, every user — that carries the policy.
Change or remove it later
Delete — Delete a policy.
Do it from code
document and id come from the create example; send the whole document, it replaces the old one. The client setup is on the Membership page. API: Update Policy · Get Policy
Last updated
Was this helpful?