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

Recursive permission scheme cannot be done #170

@antoine-gallix

Description

@antoine-gallix

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!

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