permify
permify copied to clipboard
Optional Nil Actions and Permissions in Entity Definitions
Objective
Introduce the capability for actions and permissions within entity definitions to be optionally set to nil
. This feature aims to enhance flexibility in permission management across different entities in our system.
Concept
- Entities can have them set to
nil
. - This approach allows for dynamic and contextual assignment of capabilities depending on the entity's role or specific requirements.
Examples
entity user{
action view = nil
action contribute = nil
action maintain = nil
action manage = nil
}
entity product {
relation parent @company @organization @team @user
action view = parent.view
action contribute = parent.contribute
action maintain = parent.maintain
action manage = parent.manage
}
In this example, if a user is assigned as the parent of a product, they should be able to perform these permissions.
Implementation
The implementation would require changes to the entity definition structure to accept nil
as a valid value for actions/permissions.
Hi @tolgaOzen , I would like to work on this issue. Can you assign to me?