02/01/2023, 4:04 PM
3. I have been using a mental model from linguistics of Subject, Verb, and Object when thinking about tuples; CheckPermission is of type (S, V, O) => Boolean, ExpandPermissionTree is of type (O, V) => Tree[(S, V, O)], LookupResources is of type (S, V) => Set[O], and LookupSubjects is of type (O, V) => Set[S]. Did I get that right? The expand tree concept doesn't come from the Zanzibar paper... One of the things we would like to do, is have our UI be able to do a query of type (S, O) => Set[V]. In this way we can work out which widgets to add to a dashboard e.g. if admin:1 has the finance relation with customer 1, but not the medical relationship, we can render the finance widget, but not the medical data one. Is this something anyone else has tried to do before? What alternatives might there be?