This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Description
In the following model, with a tree-structure of nested groups:
# model
Group
name: String
parent_group: Group
I would like to implement a permission like "You can edit a group name only if you have manage right on the parent group"
permissions = {
'manage':'manage',
'edit':'manage:parent',
}
The following will crash at any attempt to access a resource's needs, when potion will enter an infinite loop of trying to compute the needs mapping of the resource.
When trying to access the mapping of needs, the latter will be evaluated on demand.
When trying to resolve the edit right, it will consult the needs mapping of the parent field, which will trigger the evaluation of the need mapping.
Infinite loop!