-
Notifications
You must be signed in to change notification settings - Fork 355
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: subject expansion is terminated unexpectedly #1256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, very nice find 👍
sub := &relationtuple.SubjectSet{ | ||
Namespace: result.To.Namespace, | ||
Object: result.To.Object, | ||
Relation: result.To.Relation, | ||
} | ||
innerCtx, visited = graph.CheckAndAddVisited(innerCtx, sub) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, at this point result.To.Subject
is the same for all results:
keto/internal/persistence/sql/traverser.go
Line 108 in db59a33
to.Subject = start.Subject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks! 🎉
Hello @stonelgh |
This change fixes the issue that subject expansion will fail if the depth exceeds 2.
Related issue(s)
closes #1255
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments