Skip to content
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

Fix model inversion bug #56

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Fix model inversion bug #56

merged 1 commit into from
Sep 11, 2024

Conversation

ronenh
Copy link
Contributor

@ronenh ronenh commented Sep 11, 2024

With the standard user and group types, the following definition causes an error when inverting the model:

resource:
  relations:
    editor: user | group#member | editors#member

editors:
  relations:
    member: user | group#member

This commit fixes the problem and adds tests.

With the standard `user` and `group` types, the following definition
causes an error when inverting the model:

```yaml
resource:
  relations:
    editor: user | group#member | editors#member

editors:
  relations:
    member: user | group#member
```

This commit fixes the problem and adds tests.
@ronenh ronenh requested a review from gertd September 11, 2024 21:08
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10819698662

Details

  • 14 of 18 (77.78%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 60.842%

Changes Missing Coverage Covered Lines Changed/Added Lines %
model/validate.go 2 6 33.33%
Totals Coverage Status
Change from base Build 10682353556: 0.02%
Covered Lines: 2817
Relevant Lines: 4630

💛 - Coveralls

@gertd gertd merged commit 2d40c6c into main Sep 11, 2024
2 checks passed
@gertd gertd deleted the bugfix/invert-arrows branch September 11, 2024 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants