gravitational / predicate-lang

Predicate - Access Control System
Apache License 2.0
3 stars 2 forks source link

Ensure that enum inequalities contain only valid enum constants #38

Closed vitorenesduarte closed 1 year ago

vitorenesduarte commented 1 year ago

This PR ensures that the user can only write enum inequalities using valid enum constants.

Before this PR it was be possible to write Options.recording_mode == "foo" even though the enum constants are "best_effort" and "strict". This is now disallowed.

This check already existed in < inequalities. This PR extends it to the remaining ones.