https://authzed.com logo
#spicedb
Title
# spicedb
s

syebaurgh

10/24/2022, 11:12 PM
Say you have this schema:
Copy code
definition subject {
    relation viewer: user
    permission view = viewer
}

definition resource {
    relation subject: subject
    permission view = subject->view
}
and you create multiple relationships between subject and resource through the resource
subject
relation:
Copy code
resource:r1#subject@subject:s1
resource:r1#subject@subject:s2
resource:r1#subject@subject:s3

subject:s1#viewer@user:u1
subject:s2#viewer@user:u1