Hi, I am struggling to understand why I can't seem...
# feedback
d
Hi, I am struggling to understand why I can't seem to get my permissions to work when I use OPL, I am unsure with version of the binary I should be using since all the ones I have tried so far leads to some parsing error either with the ports in the yaml file, or an error with the typescript namespaces file.
m
Can you provide more information? What version of Keto are you using, what is your OPL, what are your relationships, what is the specific error you encounter?
d
ory keto version:
v0.14.0
the github repo also uses two different versions for migrations (using the newer tag) and the daemon (using
v0.11.x
)
my
config.yaml
looks like
Copy code
version: "v0.14.0"

log:
  level: debug

namespaces:
  location: file:///home/ory/
which seems to have fixed things. prior I was. including the
serve
option but kept getting an error that
port
was failing the parser step.
for the namespace I had the following
Copy code
// import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types"

class User implements Namespace { }

class Blog implements Namespace {
  related: {
    viewers: User[]
  }

  permits = {
    view: (ctx: Context): boolean =>
      this.related.viewers.includes(ctx.subject)
  }
}
where I had to comment out the import for the parser to check.
I have been able to solve since then but was needing to go through different versions and try just read the releases more. the
config.yaml
seemed to fail to parse
Copy code
host: 0.0.0.0
and rather expected to use
Copy code
host: "0.0.0.0"
which I dodnt understand either. I could omit these parts of the configuration and it still worked in the end.