github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/services/integrationtesting/testconfigs/groupsintersection.yaml (about) 1 --- 2 schema: |+ 3 definition user {} 4 5 definition group { 6 relation direct_member: user 7 relation intern: user 8 permission intern_member = direct_member & intern 9 } 10 11 definition document { 12 relation viewer: user | group#intern_member 13 permission view = viewer 14 } 15 16 relationships: | 17 document:firstdoc#viewer@user:tom#... 18 document:firstdoc#viewer@group:engineering#intern_member 19 group:engineering#direct_member@user:sarah#... 20 group:engineering#direct_member@user:fred#... 21 group:engineering#direct_member@user:james#... 22 group:engineering#direct_member@user:mary#... 23 group:engineering#intern@user:james#... 24 group:engineering#intern@user:tom#... 25 group:engineering#intern@user:mary#... 26 assertions: 27 assertTrue: 28 - "document:firstdoc#view@user:tom#..." 29 - "document:firstdoc#view@user:james#..." 30 - "document:firstdoc#view@user:mary#..." 31 assertFalse: 32 - "document:firstdoc#view@user:sarah#..." 33 - "document:firstdoc#view@user:fred#..."