github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/services/integrationtesting/testconfigs/document.yaml (about) 1 --- 2 schema: |+ 3 definition user {} 4 5 definition document { 6 relation owner: user 7 relation editor: user 8 relation parent: folder 9 relation viewer: user 10 11 permission edit = editor + owner 12 permission view = viewer + edit + parent->view 13 permission view_and_edit = view & edit 14 } 15 16 definition folder { 17 relation parent: folder 18 relation owner: user 19 relation editor: user 20 relation viewer: user | folder#view 21 22 permission view = viewer + editor + owner + parent->view 23 } 24 25 relationships: >- 26 document:companyplan#parent@folder:company#... 27 28 document:masterplan#parent@folder:strategy#... 29 30 folder:strategy#parent@folder:company#... 31 32 folder:company#owner@user:owner#... 33 34 folder:company#viewer@user:legal#... 35 36 folder:strategy#owner@user:vp_product#... 37 38 document:masterplan#owner@user:product_manager#... 39 40 document:masterplan#viewer@user:eng_lead#... 41 42 document:masterplan#parent@folder:plans#... 43 44 folder:plans#viewer@user:chief_financial_officer#... 45 46 folder:auditors#viewer@user:auditor#... 47 48 folder:company#viewer@folder:auditors#view 49 50 document:healthplan#parent@folder:plans#... 51 52 folder:isolated#viewer@user:villain#... 53 54 document:specialplan#editor@user:multiroleguy#... 55 assertions: 56 assertTrue: [] 57 assertFalse: []