fierro9418
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
}
fierro9418
02/07/2023, 11:27 PMdefinition 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 PMJoey
02/07/2023, 11:53 PMJoey
02/07/2023, 11:54 PMfierro9418
02/08/2023, 12:04 AMmember
as a permission, since it's not really a capability, rather a relationshipJoey
02/08/2023, 2:02 AMJoey
02/08/2023, 2:02 AMJoey
02/08/2023, 2:02 AMpermission
isfierro9418
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 AMJoey
02/08/2023, 2:25 AMJoey
02/08/2023, 2:25 AMJoey
02/08/2023, 2:25 AMJoey
02/08/2023, 2:25 AMfierro9418
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 relationhipJoey
02/08/2023, 2:35 AMpermission
is a synthetic relationshipfierro9418
02/08/2023, 2:35 AMrelation member: viewer | writer
Joey
02/08/2023, 2:35 AMJoey
02/08/2023, 2:36 AMpermission
because that's how it is commonly usedJoey
02/08/2023, 2:36 AMpermission is_member = viewer + writer
would be more accurate namingJoey
02/08/2023, 2:36 AMfierro9418
02/08/2023, 2:37 AM