Hello, im newer to spiceDB but had a question. Im ...
# spicedb
u
Hello, im newer to spiceDB but had a question. Im trying to model the following:
Copy code
definition organization {
    relation manager: user
    permission read = manager
}

definition checklist {
    relation parent: organization
    permission read = parent->read
}

definition task {
    relation parent: checklist
    relation assignee: user
    permission read = assignee + parent->read
}
In this case if a user is an organization's manager, the user can
read
all tasks and checklists no problem. But if i assign a user to a task, how do i also let this user
read
the organization and checklist? I would use
read
to be able to read the organization/checklist attributes on the app side. I could add a
relation task_assignee: user
to the organization but that means for each assignee on a task i have to create two relationships, one for the task itself and one more connecting the user to the organization which feels a bit duplicated so im just wondering if theres a way it can compute that instead Is there another way to think about this?