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

Relationship read not filtering optional subject_subject_type and optional_subject_id #97

Closed
wye0220 opened this issue Mar 11, 2022 · 0 comments · Fixed by #98
Closed
Labels
kind/bug Something is broken or regressed priority/1 high This is the top priority

Comments

@wye0220
Copy link

wye0220 commented Mar 11, 2022

Relationship read with optional_relation, optional_subject_type and optional_subject_id is not return correct result.

e.g following query will return all virtue cards with parent relation. Not all virtual cards with parent relation under creditcard:cc_9MSTeIVLW0C6aHtiQSolob

zed relationship read virtualcard parent creditcard:cc_9MSTeIVLW0C6aHtiQSolob --insecure

def user{}
def account {
    relation owner: user
    permission read = owner
}
definition creditcard {
   relation parent: account
   relation owner: user
   relation viewer: user

   permission read = owner + viewer + parent->read
   permission destroy = owner
}

definition virtualcard {
   relation parent: creditcard
   relation recipient: user
   relation viewer: user

   permission read = recipient + viewer + approver + parent->read
   permission spend = recipient
   permission requestupdate = recipient
}
@jzelinskie jzelinskie added kind/bug Something is broken or regressed priority/1 high This is the top priority labels Mar 11, 2022
josephschorr added a commit to josephschorr/zed that referenced this issue Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken or regressed priority/1 high This is the top priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants