Digital Sovereignty for everyone

Notes

Locking entries

Knowledge base entries support custom fields, so LH Post Locking can lock them. A locked entry can only be changed, trashed or deleted by an account with the lock capability (manage_options by default). Lock entries whose content drives unattended agent runs, so that an account with only edit_posts cannot rewrite the instructions an agent will follow. The daily health check procedure, workflows/health-check and workflows/health-check/baselines, is locked for this reason.

Per-entry permission checks

The write abilities’ permission callback checks edit_posts, which is type-level and cannot see restrictions on a single entry. So update-entry also checks edit_post on the entry and trash-entry checks delete_post. When the entry is locked, the refusal says so and includes locked: true. If a write still reaches WordPress and LH Post Locking’s backstop refuses it, the ability replaces core’s “Content, title, and excerpt are empty” message with the same locked error. Any new ability that writes to one entry should use the same check.

create-entry can still add a child under a locked entry, since that does not change the locked entry itself.

Reading entries that are not active

The read abilities need only read, so any signed-in user can use them. list-entries only ever returns active entries. get-entry returns an active entry to anyone with read, but a draft, pending, private or trashed one only to a user with edit_post on it; anyone else gets “Entry not found.”, so the call does not reveal that the entry exists. Before 1.8.0, any signed-in user could read such entries by ID, slug or path.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.