github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/services/integrationtesting/testconfigs/directgroups.yaml (about) 1 --- 2 schema: |+ 3 definition user {} 4 5 definition group { 6 relation member: user | group#member 7 } 8 9 definition document { 10 relation viewer: user | group#member 11 permission view = viewer 12 } 13 14 relationships: | 15 document:firstdoc#viewer@user:tom#... 16 document:firstdoc#viewer@group:everyone#member 17 group:everyone#member@group:engineering#member 18 group:everyone#member@group:sales#member 19 group:everyone#member@group:marketing#member 20 group:everyone#member@group:management#member 21 group:engineering#member@user:sarah#... 22 group:engineering#member@user:fred#... 23 group:sales#member@user:james#... 24 group:sales#member@user:manny#... 25 group:marketing#member@user:rachel#... 26 group:marketing#member@user:josh#... 27 group:marketing#member@user:eric#... 28 group:management#member@user:sam 29 group:management#member@user:victor 30 group:management#member@group:cgroup#member 31 group:management#member@group:bgroup#member 32 group:cgroup#member@user:mary#... 33 group:cgroup#member@user:jake#... 34 group:bgroup#member@user:billy#... 35 group:bgroup#member@user:bernice#... 36 document:seconddoc#viewer@group:cgroup#member 37 assertions: 38 assertTrue: 39 - "document:firstdoc#view@user:tom#..." 40 - "document:firstdoc#view@user:sarah#..." 41 - "document:firstdoc#view@user:fred#..." 42 - "document:firstdoc#view@user:james#..." 43 - "document:firstdoc#view@user:manny#..." 44 - "document:firstdoc#view@user:rachel#..." 45 - "document:firstdoc#view@user:josh#..." 46 - "document:firstdoc#view@user:eric#..." 47 - "document:firstdoc#view@user:sam#..." 48 - "document:firstdoc#view@user:victor#..." 49 - "document:firstdoc#view@user:mary#..." 50 - "document:firstdoc#view@user:jake#..." 51 - "document:firstdoc#view@user:billy#..." 52 - "document:firstdoc#view@user:bernice#..." 53 - "document:seconddoc#view@user:mary#..." 54 - "document:seconddoc#view@user:jake#..." 55 assertFalse: 56 - "document:seconddoc#view@user:tom#..." 57 - "document:seconddoc#view@user:sarah#..." 58 - "document:seconddoc#view@user:fred#..." 59 - "document:seconddoc#view@user:james#..." 60 - "document:seconddoc#view@user:manny#..." 61 - "document:seconddoc#view@user:rachel#..." 62 - "document:seconddoc#view@user:josh#..." 63 - "document:seconddoc#view@user:eric#..." 64 - "document:seconddoc#view@user:sam#..." 65 - "document:seconddoc#view@user:victor#..." 66 - "document:seconddoc#view@user:billy#..." 67 - "document:seconddoc#view@user:bernice#..."