• Joey

    Joey

    8 months ago
    in general, we recommend that all "accessed" "exported" items (whether via a
    check
    call, or on the right hand side of an arrow) be a permission
  • Joey

    Joey

    8 months ago
    i.e. if it is checked from your app code, or is used by an arrow from a different definition, making it a permission means you have the flexibility to change it later without having to fix all the call sites
  • Joey

    Joey

    8 months ago
    for arrows, that's minor, since you can just update everything in the schema
  • Joey

    Joey

    8 months ago
    for external API calls, its nicer to have them all be permissions, unless you're explicitly checking if a subject is part of that relation
  • c

    cd

    7 months ago
    Hi, a couple of quick questions on importing relationships... It looks like
    zed import
    expects a YAML file... can you point me to the documentation describing that file? Also, are
    zed import
    operations idempotent?
  • e

    ecordell

    7 months ago
    you can see an example of the format if you go the play.authzed.com and click "download" - it's basically the contents of each of the four tabs in the playground under four keys in yaml (here's an example: https://gist.github.com/ecordell/fe3c81f753a5c425610a8b39accfb97c) and yes the import operation for one of these files is idempotent: it overwrites the schema (replacing what was there) and it writes the relationships with a "touch" operation
  • c

    cd

    7 months ago
    thanks!
  • c

    cd

    7 months ago
    Hi, one more question regarding importing; is there some way to tell the
    zed import
    command to use the prefix designated for the permissions-system at time of creation? The intention behind the question is to use a common schema file that all the devs can import into private development permission-system instances. But whenever I try to do an import, zed says that it finds resources without prefixes. If I recall correctly, I was able to author a schema in the playground and import it into the permissions system via the "import" button, and the prefix was just somehow automatically added.
  • Joey

    Joey

    7 months ago
    currently the rewriting is done by the playground, yes
  • Joey

    Joey

    7 months ago
    mind filing an issue in https://github.com/authzed/zed/issues to do the rewrite as well?