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

Support computed sets in arrow operator base #69

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ronenh
Copy link
Contributor

@ronenh ronenh commented Feb 6, 2025

This PR modifies both check and search to correctly handle arrow operators in which the relation at the base of the arrow is a computed set.
For example:

  resource:
    relations:
      viewer: user | group#member
    permissions:
      can_view: viewer | viewer->identifier

  component:
    relations:
      part: component | component#part
      maintainer: user | group#member

    permissions:
      can_repair: maintainer | maintainer->identifier | part->can_repair

The implementation was not populating the subject_relation field
from the RelationIdentifier coming out of the directory.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13187805262

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 65.504%

Totals Coverage Status
Change from base Build 13073701464: 0.009%
Covered Lines: 2647
Relevant Lines: 4041

💛 - Coveralls

But wildcard relations in the base of an arrow are prohibited.
@ronenh ronenh force-pushed the bugfix/expand-permission-term branch from b79ec2d to a3e6800 Compare February 10, 2025 20:30
@ronenh ronenh marked this pull request as draft February 10, 2025 23:51
@ronenh ronenh changed the title Checker.expandTerm handles subject relations. Support computed sets in arrow operator base Feb 10, 2025
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.

2 participants