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

     1  ---
     2  schema: |+
     3    definition user {}
     4  
     5    definition resource {
     6    	relation manager: user | usergroup#member | usergroup#manager
     7    	relation viewer: user | usergroup#member | usergroup#manager
     8        permission view = viewer + manager
     9    }
    10  
    11    definition usergroup {
    12    	relation manager: user | usergroup#member | usergroup#manager
    13    	relation direct_member: user | usergroup#member | usergroup#manager
    14        permission member = direct_member + manager
    15    }
    16  
    17    definition organization {
    18    	relation group: usergroup
    19    	relation resource: resource
    20    	relation admin: user | usergroup#member | usergroup#manager
    21    	permission member = admin + group->member
    22    	permission user = admin + member + resource->view
    23    }
    24  
    25  relationships: >-
    26    usergroup:productname#manager@user:an_eng_manager#...
    27  
    28    usergroup:productname#direct_member@user:an_engineer#...
    29  
    30    usergroup:applications#manager@user:an_eng_director#...
    31  
    32    usergroup:engineering#manager@user:cto#...
    33  
    34    usergroup:csuite#manager@user:ceo#...
    35  
    36    usergroup:csuite#direct_member@user:cto#...
    37  
    38    usergroup:engineering#direct_member@usergroup:applications#member
    39  
    40    usergroup:applications#direct_member@usergroup:productname#member
    41  
    42    usergroup:engineering#direct_member@usergroup:csuite#member
    43  
    44    organization:someorg#group@usergroup:csuite#...
    45  
    46    organization:someorg#group@usergroup:productname#...
    47  
    48    organization:someorg#group@usergroup:applications#...
    49  
    50    organization:someorg#group@usergroup:engineering#...
    51  
    52    organization:someorg#resource@resource:promserver#...
    53  
    54    organization:someorg#resource@resource:jira#...
    55  
    56    organization:someorg#admin@usergroup:csuite#member
    57  
    58    organization:someorg#admin@user:it_admin#...
    59  
    60    resource:promserver#manager@usergroup:productname#member
    61  
    62    resource:promserver#viewer@usergroup:engineering#member
    63  
    64    resource:jira#viewer@usergroup:engineering#member
    65  
    66    resource:jira#manager@usergroup:engineering#manager
    67  
    68    resource:promserver#viewer@user:an_external_user#...
    69  
    70    usergroup:blackhats#manager@user:a_villain#...
    71  
    72  assertions:
    73    assertTrue: []
    74    assertFalse: []