Hi, I think we are running into some
# spicedb
p
Hi, I think we are running into some issues with our schema. We want that a portfolio admin can see all the communities part of the portfolio. And that someone part of a community can see the portfolio that the community is part of. However the moment we reference both permissions I believe it's failling into an infinite loop as they reference each other. What would be the correct way to do this? Here is our scehma
Copy code
definition portfolio {
    relation manager: administrator
    relation platform: platform
    relation community: community
    permission admin = manager->neighbour + platform->central_team
    permission view = admin + community->view
}

definition community {
    relation platform: platform
    relation property: property
    relation portfolio: portfolio
    permission view = staffer + property->member + platform->provider + portfolio->admin
}
y
where are you seeing a loop? you're correct that if two permission computations reference each other in a circular way, you'll hit a recursion depth limit however, there's nothing wrong with two definitions pointing at each other i see how the portfolio view permission points at the community view permission, but i don't see how the community permission points back at the portfolio view permission