openfga / language

Grammar for the OpenFGA modeling language
https://openfga.dev
Apache License 2.0
16 stars 7 forks source link

feat: add limited support for mixed operators #107

Closed rhamzeh closed 8 months ago

rhamzeh commented 9 months ago

This PR adds initial support for mixed operators

Description

Cases to be supported (both from and to DSL) (with no direct assignment):

(with direct assignment, only if there is a single reference to the assignment and only if it is the first entry):

Cases NOT planned to supported yet, pending discussion: Anything involving multiple references to direct assignment, or the presence of direct assignment not as the first entry, or references to self/this:

References

Review Checklist

d-jeffery commented 9 months ago

~Sadly this grammar, while pretty robust doesnt catch define relation: rel1 and ([user] or thing) as expected. Might have to validate it during transformation, unless we can spot a way to catch this with the grammar rules.~

Nevermind, think i got it.