I’m working on a simple test case in OPL and am ha...
# talk-keto
b
I’m working on a simple test case in OPL and am having some problems getting things working (using Ory Network). My current model is:
Copy code
import { 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:
Copy code
$ 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?