-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support prefix rewrites for zed import just like the playground does #81
Comments
I've actually raised this in the past, so I'm glad to see that my failure to create an issue was accounted for, haha. One downside with looking up the the prefix for the given credential is that if there is ever a future where Authzed.com users can share/bridge their schemas with each other, this could lead to some very subtle bugs. |
Following this change, `zed import` now supports two modes for handling prefixes: 1) A new CLI flag `--schema-definition-prefix` which will automatically rewrite the schema and test relationships with that prefix 2) If not specified, `zed import` will first call `ReadSchema` for the permissions system and, if a prefix is found, use that prefix automatically Fixes authzed#81
Following this change, `zed import` now supports two modes for handling prefixes: 1) A new CLI flag `--schema-definition-prefix` which will automatically rewrite the schema and test relationships with that prefix 2) If not specified, `zed import` will first call `ReadSchema` for the permissions system and, if a prefix is found, use that prefix automatically Fixes authzed#81
When one edits a schema in the playground then imports it back into a permissions system via the "import" button, the playground automatically prepends the permission system's prefix to each reference in the schema.
However, that rewrite doesn't happen on
zed import
operations, making it difficult to share a common schema file with multiple permission systems; each reference in the schema has to be manually modified to include the prefix for the destination permission system.This is a request to either:
The text was updated successfully, but these errors were encountered: