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: policy filter in get all user api #16

Merged
merged 1 commit into from
Aug 6, 2021
Merged

Conversation

rsbh
Copy link
Member

@rsbh rsbh commented Aug 5, 2021

In Get Users api when we apply the role.tags filter on the policies field, it is filtering the User list, not the subfield.

This happened due to the 'Where` clause is getting applied on the Users list.
So instead of doing that we can filter the casbin_rule policies at the time of aggregation.

This fix also adds support to pass multiple role tags in the query.

@rsbh rsbh requested review from NNcrawler and pyadav August 5, 2021 16:57
@NNcrawler NNcrawler merged commit 37e6911 into main Aug 6, 2021
@NNcrawler NNcrawler deleted the user_api_policy_filter branch August 6, 2021 04:08
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