Skip to content

Change which hierarchy levels can nest inside which

You control nesting by editing the allowed parents for a hierarchy level. The rules are stored as data, so a level can be allowed under more than one parent level.

Before you start

  • You must be signed in.
  • To change a level’s allowed parents, you need hierarchy.update permission.
  • hierarchy.update is hierarchical, and a grant at the target node or any ancestor of it can satisfy it.
  • The application has a Hierarchy screen under Admin.
  • The records do not say how you reach the control for editing allowed parents from the Hierarchy screen.

Steps

  1. Open Admin > Hierarchy.
  2. Find the hierarchy level you want to change.
  3. Update that level’s allowed parents so it lists the parent levels you want it to be able to sit under.

[!CLARIFY] Which control on the Hierarchy screen opens the allowed-parents editor for a level?

What this does

The application treats nesting as a set of rules attached to each level, not as a fixed depth comparison. Replacing a level’s allowed parents changes the whole set of legal parents for that level.

A level starts with no allowed parents. Unless allows_root is set, no node can be created at that level until its allowed parents are defined.

Common problems

  • If a level has no allowed parents and allows_root is not set, no nodes can be created at that level.
  • The records say the allowed-parents update replaces the level’s legal parents wholesale, and the payload is validated before anything is deleted, so a bad level id cannot leave the level with no rules at all.

Where this lives

  • ⚙️ Admin → 🏢 Hierarchy/admin/hierarchy

Permissions you need

Permission How it can be granted
hierarchy.create (Add) a grant at the target node or any ancestor of it
hierarchy.update (Edit) a grant at the target node or any ancestor of it

Not available in the interface

These capabilities exist and are enforced, but no screen in the application calls them. An administrator has to use the API or the database directly, and the same permission still applies.

Capability Call Permission
get allowed parents GET /api/hierarchy/levels/{level_id}/allowed-parents not determined — no check found in the code
replace allowed parents PUT /api/hierarchy/levels/{level_id}/allowed-parents hierarchy.update (Edit)

Screenshots

The hierarchy screen manages nodes and levels; the nesting rules themselves are not editable here

The hierarchy screen manages nodes and levels; the nesting rules themselves are not editable here

Reference

API calls behind this task - `GET /api/hierarchy/levels` - `POST /api/hierarchy/levels` - `GET /api/hierarchy/levels/{level_id}/allowed-parents` — no screen calls this - `PUT /api/hierarchy/levels/{level_id}/allowed-parents` — no screen calls this

Didn't find your answer here? Tell us what was missing — it becomes a tracked suggestion.