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

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