Group Hierarchy
Last updated: 2026-05-20
Groups can be arranged in a parent–child tree. A parent contains child groups, children can have their own children, and the structure can extend to a configurable maximum depth.
Permissions — adding or removing children requires
group:updateon the parent group. Viewing the hierarchy requiresgroup:read.
What hierarchy unlocks
- Permission inheritance — members of a child group can inherit permissions assigned to the parent (when
inheritPermissionsis enabled on the hierarchy link). - Effective membership traversal — the backend computes the full set of groups an entity belongs to by walking parents upward, so a permission check on a single child can resolve permissions all the way to the workspace-scoped root.
- Organisational structure — mirror an org chart with nested teams.
- Bulk management — operate on a sub-tree by acting on the parent.
Viewing the workspace-wide tree
Open /groups/hierarchy to see every group that participates in hierarchy. The page header shows the count of groups in hierarchy. You can switch between:
- Tree view — collapsible nested list
- Diagram view — graphical layout (when enabled)
Click any group in the tree to jump to its detail page.
The page also surfaces:
- Root groups — groups that have children but no parents
- Orphan children — groups that have parents but no children (leaves)
Setting up hierarchy on a single group
- Open the group's Hierarchy tab (
/groups/:groupId/hierarchy). - The tab shows the group's current parent groups and child groups.
- Click Add Child Group, paste the child group's ID, and confirm.
- The link is created immediately and the tab refreshes.
The parent must have Allow Nested Groups enabled in its settings; otherwise the action is disabled with a hint. System groups (isSystemGroup: true) cannot have their hierarchy edited from the UI.
Requirements enforced by the backend
- The child group must be in the same workspace.
- Adding the child must not exceed the parent's
maxNestingDepth. - Cycles (e.g. making a group its own ancestor) are rejected.
Removing a Child
- In the Hierarchy tab, find the child group row.
- Click the trash / remove icon and confirm.
- The link is detached but the child group itself is not deleted — it just becomes orphaned from this parent.
A CHILD_GROUP_REMOVED event is recorded.
Hierarchy Constraints
| Constraint | Details |
|---|---|
| Max depth | Set per parent group (default: 5). A group cannot have children that would push the chain beyond its depth limit. |
| Cycle prevention | You cannot add a group as a child of one of its own descendants. |
| Workspace boundary | Groups can only be linked to groups in the same workspace. |
| Archived parents | Child groups remain ACTIVE even if their parent is archived; membership inheritance from an archived parent stops working until the parent is restored. |
| System groups | isSystemGroup groups are read-only — hierarchy cannot be edited from the UI. |
See also
- Group settings —
allowNestedGroups,maxNestingDepth - Dynamic groups
- Permissions reference