fierro
02/07/2023, 11:15 PMRelations can also "contain" references to other relations/permissions.
For example, a group's member relation might include the set of objects marked as member of another group, indicating that the other group's members are, themselves, members of this group:
definition user {}
definition group {
/**
* member can include both users and *the set of members* of other specific groups.
*/
relation member: user | group#member
}
definition container {
relation viewer: user
relation writer: user
relation member: viewer | writer
}
I want a member to be defined as the union of the set of viewers and writers on this and only this object
I could obviously do
definition container {
relation viewer: user
relation writer: user
relation member: container#viewer | container#writer
}
but I don't want it to be true that any other container's viewer could be a member of this containerJoey
02/07/2023, 11:53 PMfierro
02/08/2023, 12:04 AMmember
as a permission, since it's not really a capability, rather a relationshipJoey
02/08/2023, 2:02 AMpermission
isfierro
02/08/2023, 2:23 AMrelation member: container#viewer | container#writer
either isn't feasible, wouldn't be a good idea if it were feasible, or is just nonsensical hahaJoey
02/08/2023, 2:25 AMfierro
02/08/2023, 2:31 AMrelation member: viewer | writer
, the version that would be "scoped" to the current container. But ok, sounds like I need to update my mental model of the difference between relations and permissions.Joey
02/08/2023, 2:35 AMrelation
is a defined data-based relationhippermission
is a synthetic relationshipfierro
02/08/2023, 2:35 AMrelation member: viewer | writer
Joey
02/08/2023, 2:35 AMpermission
because that's how it is commonly usedpermission is_member = viewer + writer
would be more accurate namingfierro
02/08/2023, 2:37 AM