The /download path of the playground is returning a validation file that isn't valid. For example
https://play.authzed.com/s/iksdFvCtvnkR/download
returns (some lines omitted for brevity)
schema: |-
definition user {}
definition resource {
relation manager: user | usergroup#member | usergroup#manager
relation viewer: user | usergroup#member | usergroup#manager
permission manage = manager
permission view = viewer + manager
}
...
relationships: |-
// Add users to various groups
usergroup:productname#manager@user:an_eng_manager
usergroup:productname#direct_member@user:an_engineer
...
validation: |
organization:org1#admin:
- "[user:ceo] is <usergroup:csuite#manager>"
- "[user:cto] is <usergroup:csuite#direct_member>"
...
assertions: |
assertTrue: []
assertFalse: []
Notice the following: validation: | and assertions: |. This is incorrect - they are not strings.
I believe the issue is that this struct:
https://github.com/authzed/spicedb/blob/1de8a05f55f97268b047b59dba05f969757d7dbe/internal/services/v0/sharestore.go#L29-L37
doesn't have the right types.
The downstream effect of this is that zed validate <playground-url> doesn't work: authzed/zed#487
The
/downloadpath of the playground is returning a validation file that isn't valid. For examplehttps://play.authzed.com/s/iksdFvCtvnkR/download
returns (some lines omitted for brevity)
Notice the following:
validation: |andassertions: |. This is incorrect - they are not strings.I believe the issue is that this struct:
https://github.com/authzed/spicedb/blob/1de8a05f55f97268b047b59dba05f969757d7dbe/internal/services/v0/sharestore.go#L29-L37
doesn't have the right types.
The downstream effect of this is that
zed validate <playground-url>doesn't work: authzed/zed#487