Andrii
01/22/2025, 4:57 PMdefinition document {
relation editor: user
relation viewer: user
relation template: template
relation organization: organization
permission view = viewer + editor + template->edit + organization->full_access
permission edit = editor + template->edit + organization->full_access
// I need to know which permission has been set explicitly
permission explicit_view = viewer + editor
permission explicit_edit = editor
// And a general one for inherited permissions
permission inherit_any_action_by_template = template->edit
permission inherit_any_action_by_organization = organization->full_access
}
1. Is it a normal practise to do syntetic computed permissions just to understand what has been set explicitly and what is inherited ? (we need that understanding for better UI/UX)
2. Initially I wanted to do relation parent: template | organization
but that would disable the opportunity to get the source of inheritance in the future (e.g. I want to know that user has edit permissions because he is organization->full_access). What's the best advice here to be able to understant where this inheritader access is coming from?
Thanks in advance