Skip to content

Site · API

Managing Authorization Policies

Last updated 18 November 2026

Update or delete an authorization policy safely, after checking what uses it.

Change a policy when the rule it checks changes, for example when a members area should admit a new role. Delete a policy when nothing uses it any more. Policies decide who may reach pages, endpoints and forms, so check what uses a policy before you change it.

Update a policy

  1. In the admin, open API and choose Authorization Policies.
  2. Find the policy and select Edit.
  3. Change the name on the Details tab, or the Liquid on the Body tab.
  4. Save.

Delete a policy

  1. Open API, then Authorization Policies.
  2. Find the policy and choose to delete it.
  3. Confirm.

Warning

Before you delete or rename a policy, remove it from every page, endpoint and form that lists it. Pages name policies by their name, so a missing one breaks access.

What you can change

PartNotes
Display nameShown in the list
File pathThe record key. Changing it moves the policy file
BodyThe Liquid rule. Every path must print true or false
Redirect and flash alertWhere a refused visitor goes, and the message they see

Policies shipped by Insites modules, under modules/insites_, are not listed and cannot be edited here.

Check what exists

Query

{
  admin_authorization_policies(per_page: 5) {
    total_entries
    results { name redirect_to }
  }
}

Response on the docs site

{
  "data": {
    "admin_authorization_policies": {
      "total_entries": 2,
      "results": [
        { "name": "modules/insites_crm/insites_external_data_auth", "redirect_to": "admin/insites/unauthorized.json" },
        { "name": "only_allowed_if_ins_administrator", "redirect_to": "admin/401" }
      ]
    }
  }
}

This ran read-only on the docs.insites.io site on 1 November 2026.

Common mistakes

  • Editing a policy file that a developer also deploys. The next deploy replaces your edit.
  • A body that prints nothing on one path. Write an explicit false.
  • Testing a change on production first. Test on staging.