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

ListUsers exclusion #1473

Merged
merged 20 commits into from
Mar 25, 2024
Merged

ListUsers exclusion #1473

merged 20 commits into from
Mar 25, 2024

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Mar 20, 2024

Description

Adding support for exclusion rewrites in ListUsers via the but not operator.

To achieve this, we need to expand both parts of the rewrite, the base and subtract. .The base is the left-portion of the but not operator that must evaluate true. The subtract is the right-portion that much evaluate false. First, all the subjects that evaluate true to the base are iterated through and cross-checked against the subtract subjects. If subjects that are only present in the base and not the subtract are returned on the channel.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@willvedd willvedd marked this pull request as ready for review March 20, 2024 20:23
@willvedd willvedd requested a review from a team as a code owner March 20, 2024 20:23
Base automatically changed from listusers-intersection to list-users March 21, 2024 00:18
@willvedd willvedd requested a review from jon-whit March 25, 2024 15:45
@willvedd willvedd merged commit 98d8c6c into list-users Mar 25, 2024
5 checks passed
@willvedd willvedd deleted the listusers-exclusion branch March 25, 2024 20:36
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