second question: I noticed that I can insert (usin...
# talk-keto
f
second question: I noticed that I can insert (using
keto 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.:
Copy code
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:
Copy code
echo "Connection:1#edit@bob" | keto relation-tuple parse --format json - | keto relation-tuple create -
Copy code
keto check bob edit Connection 1

Allowed