It's a new year and we have lots of updates to share:
Revamped object types, now with type restrictions
We've revamped object types, making them more succinct and easier to work with. Additionally, object types now support type restrictions. For example, teams could previously specify in an object type that a user is an owner
of report:A
if that user is a member
of another object that is an owner
of report:A
. However, it wasn't possible to specify that the user must be a member
of a particular type of object (i.e. a tenant
) in order to this inheritance to occur. This is now possible via the revamped object type schema. Check out an example below or read more in our docs.
{
"type": "report",
"relations": {
"owner": {
"inheritIf": "member",
"ofType": "tenant",
"withRelation": "owner"
},
"editor": {
"inheritIf": "anyOf",
"rules": [
{
"inheritIf": "owner"
},
{
"inheritIf": "member",
"ofType": "tenant",
"withRelation": "editor"
}
]
},
"viewer": {
"inheritIf": "anyOf",
"rules": [
{
"inheritIf": "editor"
},
{
"inheritIf": "member",
"ofType": "tenant",
"withRelation": "viewer"
}
]
}
}
}