Skip to content

Instantly share code, notes, and snippets.

@csuwildcat
Last active November 15, 2023 15:49
Show Gist options
  • Save csuwildcat/39ab571ec0dd6f00312ad4d57aaccb70 to your computer and use it in GitHub Desktop.
Save csuwildcat/39ab571ec0dd6f00312ad4d57aaccb70 to your computer and use it in GitHub Desktop.
{
"definition":{
"published":true,
"protocol":"https://protocol.example",
"types":{
"album":{
"schema":"https://protocol.example/album",
"dataFormats":[
"application/json"
]
},
"photo":{
"dataFormats":[
"image/png",
"image/jpeg",
"image/gif"
]
},
"metadata":{
"schema":"https://protocol.example/metadata",
"dataFormats":[
"application/json"
]
},
"friend":{
"schema":"https://protocol.example/friend",
"dataFormats":[
"application/json"
]
},
"guest":{
"schema":"https://protocol.example/guest",
"dataFormats":[
"application/json"
]
}
},
"structure":{
"friend":{
"$globalRole":true
},
"album":{
"$actions":[
{
"role":"friend",
"can":"write"
},
{
"role":"album/guest",
"can":"read"
}
],
"guest":{
"$contextRole":true,
"$actions":[
{
"who":"author",
"of":"album",
"can":"write"
}
]
},
"photo":{
"$actions":[
{
"who":"author",
"of":"album",
"can":"write"
},
{
"who":"author",
"of":"album",
"can":"query"
},
{
"who":"author",
"of":"album",
"can":"read"
},
{
"role":"album/guest",
"can":"write"
},
{
"role":"album/guest",
"can":"query"
},
{
"role":"album/guest",
"can":"read"
}
],
"metadata":{
"$actions":[
{
"who":"author",
"of":"album",
"can":"write"
},
{
"who":"author",
"of":"album",
"can":"query"
},
{
"who":"author",
"of":"album",
"can":"read"
},
{
"role":"album/guest",
"can":"write"
},
{
"role":"album/guest",
"can":"query"
},
{
"role":"album/guest",
"can":"read"
}
]
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment