full-petabyte-13526
04/19/2023, 10:48 PMketo relation-tuple create
) something I have in a permit
. Is that expected? Or put another way -- are permits supposed to be directly assignable as well as act as functions against relations (related
) / are permits relations themselves? e.g.:
class Connection implements Namespace {
related: {
owners: User[];
};
permits = {
view: (ctx: Context): boolean => this.permits.edit(ctx),
edit: (ctx: Context): boolean => this.related.owners.includes(ctx.subject),
...
then:
echo "Connection:1#edit@bob" | keto relation-tuple parse --format json - | keto relation-tuple create -
keto check bob edit Connection 1
Allowed