This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"tuple_key": { | |
"object": "org:a", | |
"relation": "member", | |
"user": "user:beth" | |
}, | |
"contextual_tuples": { | |
"tuple_keys": [{ | |
"object": "integrity:1234", | |
"relation": "member_in_context", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"object": "user_repo:admin_global", | |
"relation": "member", | |
"user": "user:super_bob" | |
}, | |
{ | |
"object": "org:a", | |
"relation": "admin_repo", | |
"user": "user_repo:admin_global" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type feature | |
relations | |
define access as subscriber_member from associated_plan | |
define associated_plan as self | |
define subscriber as subscriber from associated_plan | |
type feature_repo | |
relations | |
define feature as self | |
type integrity | |
relations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "01GDNMBXVJDG63HR5YJB356DG1", | |
"name": "integrity", | |
"authorization_model": { | |
"id": "01GFVB1ZJ6HP3TRPZC1BA41BJF", | |
"type_definitions": [{ | |
"type": "integrity", | |
"relations": { | |
"member_in_context": { | |
"this": {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query | |
======================== | |
{ | |
"tuple_key": { | |
"object": "org:a", | |
"relation": "member", | |
"user": "anne" | |
}, | |
"contextual_tuples": { | |
"tuple_keys": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"object": "user_repo:global", | |
"relation": "member", | |
"user": "anne" | |
}, { | |
"user": "integrity:1", | |
"relation": "integrity", | |
"object": "user_repo:global" | |
}, { | |
"object": "integrity:1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------ | |
// Request, find all plans that our org has subscribed to | |
//------------------------ | |
{ | |
"tuple_key": { | |
"object": "plan:", | |
"relation": "subscriber", | |
"user": "org:A" | |
}, | |
"page_size": 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"object": "org:A", | |
"relation": "member", | |
"user": "anne" | |
}, | |
{ | |
"object": "user_repo:*", | |
"relation": "member", | |
"user": "anne" |