billowy-soccer-77917
05/05/2023, 6:08 PMimport { Namespace, SubjectSet, Context } from "@ory/permission-namespace-types"
class Account implements Namespace { }
class Organization implements Namespace {
related: {
members: Account[]
}
permits = {
view: (ctx: Context): boolean => this.related.members.includes(ctx.subject)
}
}
However, I get a denied when checking if an account has permission to view an Organization that it’s a member of:
$ ory list relationships
NAMESPACE OBJECT RELATION NAME SUBJECT
Organization b8cec46a-2544-487a-9a22-a1ce10aaa552 member Account:6ec2f549-0006-469e-af3b-1bd4207e7035
NEXT PAGE TOKEN
IS LAST PAGE true
$ ory is allowed Account:6ec2f549-0006-469e-af3b-1bd4207e7035 view Organization b8cec46a-2544-487a-9a22-a1ce10aaa552
Denied
Am I missing something simple here?