user
12/07/2021, 6:08 PMuser
12/08/2021, 5:56 PMvroldanbet
12/08/2021, 5:58 PMuser
12/08/2021, 5:59 PMvroldanbet
12/08/2021, 5:59 PMBryan
12/09/2021, 3:50 PM// my comment
) are added to the Test Relationships in the playground, exporting that playground results in an invalid yaml file. Here is an example playground: https://play.authzed.com/s/Zbshi3GVS9Fc/schema. It generates the following yaml:
yaml
schema: >-
definition github/user {}
definition github/project {
relation reader: github/user
relation writer: github/user
relation owner: github/user
permission read = reader + writer
permission write = writer + owner
permission admin = owner
}
relationships: >-
// Add users to project
github/project:pied_piper#owner@github/user:milburga
github/project:pied_piper#reader@github/user:tarben
github/project:pied_piper#writer@github/user:freyja
assertions:
assertTrue: []
assertFalse: []
validation: null
When serving SpiceDB locally with this config, zed schema read
fails with this error:
> Error: rpc error: code = Unknown desc = unable to initialize upstream: failed to load config files: Error parsing relationship #0: // Add users to projectuser
12/09/2021, 3:51 PMvroldanbet
12/09/2021, 3:53 PMvroldanbet
12/09/2021, 3:53 PMvroldanbet
12/09/2021, 3:54 PMuser
12/09/2021, 3:55 PMuser
12/09/2021, 3:55 PMTicTac
12/09/2021, 4:33 PMJoey
12/09/2021, 4:39 PMJoey
12/09/2021, 4:39 PMJoey
12/09/2021, 4:40 PMReadRelationships
Joey
12/09/2021, 4:41 PMread
permission include write
? if so, you could call LookupResources
and then issue a Check
to see if the user also has write permission on each (although it would be a lot of calls)TicTac
12/09/2021, 4:43 PMTicTac
12/09/2021, 4:45 PMJoey
12/09/2021, 4:46 PMCheck
for each for the higher permissions to determine the user's additional permission(s) on eachJoey
12/09/2021, 4:47 PMJoey
12/09/2021, 4:47 PMTicTac
12/09/2021, 4:47 PMJoey
12/09/2021, 4:48 PMTicTac
12/09/2021, 4:48 PMuser
12/09/2021, 4:54 PMuser
12/09/2021, 4:55 PMvroldanbet
12/09/2021, 4:55 PMBryan
12/09/2021, 4:56 PMvroldanbet
12/09/2021, 4:56 PM