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

     1  ---
     2  schema: >-
     3    definition test/user {}
     4  
     5    definition test/resource {
     6      relation viewer: test/user | test/user:*
     7      relation banned: test/user
     8      relation mustbehere: test/user
     9  
    10      permission view = viewer - banned
    11      permission specialview = view & mustbehere
    12    }
    13  relationships: |
    14    test/resource:first#viewer@test/user:*
    15    test/resource:first#banned@test/user:bannedguy
    16    test/resource:first#mustbehere@test/user:somegal
    17  assertions:
    18    assertTrue:
    19      - "test/resource:first#viewer@test/user:somegal"
    20      - "test/resource:first#viewer@test/user:anotherperson"
    21      - "test/resource:first#viewer@test/user:thirduser"
    22      - "test/resource:first#viewer@test/user:bannedguy"
    23  
    24      - "test/resource:first#view@test/user:somegal"
    25      - "test/resource:first#view@test/user:anotherperson"
    26      - "test/resource:first#view@test/user:thirduser"
    27  
    28      - "test/resource:first#mustbehere@test/user:somegal"
    29      - "test/resource:first#specialview@test/user:somegal"
    30    assertFalse:
    31      - "test/resource:first#view@test/user:bannedguy"
    32  
    33      - "test/resource:first#specialview@test/user:bannedguy"
    34      - "test/resource:first#specialview@test/user:anotherperson"
    35      - "test/resource:first#specialview@test/user:thirduser"