Skip to content

Docs unclear: how does _inheritrights behave when an entity has multiple _parent values? #2

Description

@mitselek

Summary

The docs cover multi-parent (entity can have multiple _parent values) and rights inheritance (_inheritrights: true inherits from parent) as separate concepts, but never explicitly say how they combine. The single most important detail — what happens when an entity has multiple parents AND _inheritrights: true — is left to the reader to assume.

What the docs currently say

From overview/entities:

Multiple parents — An entity can have more than one parent and appears as a child in each context without being duplicated.

Rights inheritance — When _inheritrights: true is set on a child entity, it inherits the access rights from its parent. Changes at the parent level cascade down to all children with inheritance enabled.

Right evaluation order: explicit rights on the entity → inherited rights from parent → _sharing level. _noaccess overrides all other rights on the same entity — including direct positive rights. It is not propagated to children via _inheritrights; only _viewer, _expander, _editor, and _owner are inherited.

The wording "its parent" (singular) doesn't address the multi-parent case.

What's ambiguous

When entity C has _parent: [A, B] and _inheritrights: true:

  1. Are the inherited rights the union of A's and B's grant lists? (i.e. anyone with _viewer on A OR _viewer on B can view C)
  2. Or is one parent "primary" and the other ignored for inheritance?
  3. What if A grants _viewer to user X but B has _noaccess for user X — does either rule "win," or does X end up with no access via inheritance? (The docs note that _noaccess doesn't propagate via _inheritrights, but they don't say what happens when one parent's rights would inherit and another's _noaccess would not.)
  4. Does the _sharing fallback ever consider both parents (e.g., if A is _sharing: domain and B is _sharing: private)?

Why it matters

We're modeling an umbrella↔collective hierarchy in Polyphony on Entu where the design assumes union-of-parents (an umbrella admin should see members in all child collectives via multi-parent on the Organization entity). If Entu doesn't actually behave that way, the design is broken and we'd have to fall back to per-entity grants or app-level enforcement. We can verify experimentally, but the docs should answer this without requiring every user to run their own probe.

Suggested fix

Add a "Multi-parent inheritance" subsection under overview/entities → Rights Inheritance that explicitly covers:

  • How inherited rights combine across multiple parents (union, primary-only, etc.)
  • How _noaccess on one parent interacts with positive rights inherited from another
  • How _sharing is determined when parents differ

Even a one-paragraph answer would close the gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions