github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/services/integrationtesting/testconfigs/publicviattu.yaml (about)

     1  ---
     2  schema: >-
     3    definition test/user {}
     4  
     5    definition test/folder {
     6      relation viewer: test/user | test/user:*
     7    }
     8  
     9    definition test/resource {
    10      relation parent: test/folder
    11  
    12      permission view = parent->viewer
    13    }
    14  relationships: |
    15    test/folder:somefolder#viewer@test/user:*
    16    test/resource:first#parent@test/folder:somefolder
    17    test/resource:second#parent@test/folder:anotherfolder
    18  assertions:
    19    assertTrue:
    20      - "test/resource:first#view@test/user:editordude"
    21      - "test/resource:first#view@test/user:anotheruser"
    22    assertFalse:
    23      - "test/resource:second#view@test/user:editordude"
    24      - "test/resource:second#view@test/user:anotheruser"