Skip to content

fix: remove_filtered_policy_returns_effects inconsistent input#211

Merged
leeqvip merged 1 commit intoapache:masterfrom
Abingcbc:remove_filtered_policy_returns_effects
Nov 12, 2021
Merged

fix: remove_filtered_policy_returns_effects inconsistent input#211
leeqvip merged 1 commit intoapache:masterfrom
Abingcbc:remove_filtered_policy_returns_effects

Conversation

@Abingcbc
Copy link
Copy Markdown
Contributor

Signed-off-by: abingcbc abingcbc626@gmail.com

What problem does this PR solve?

The input field_values of remove_filtered_policy_returns is like ("alice", "tom"), but the one of remove_filtered_policy_returns_effects is like (("alice", "tom"),).

What is changed and how it works?

remove_filtered_policy_returns_effects

Just use field_values but not field_values[0]. But it cannot pass the unit test, so we have to modify where it is used.

remove_filtered_policy_self

The only usage of remove_filtered_policy_returns_effects is remove_filtered_policy_self. In this function, the original codes didn't unwrap the field_values and directly pass it to remove_filtered_policy_returns_effects. So we can unwrap field_values here and keep the input consistent with remove_filtered_policy.

…emove_filtered_policy

Signed-off-by: abingcbc <abingcbc626@gmail.com>
@casbin-bot
Copy link
Copy Markdown

@ffyuanda @Zxilly @techoner @elfisworking please review

@hsluoyz
Copy link
Copy Markdown
Member

hsluoyz commented Nov 11, 2021

@techoner plz review

@Abingcbc
Copy link
Copy Markdown
Contributor Author

@techoner PTAL ❤️ Another PR depends on this one.

@leeqvip leeqvip merged commit e7e6696 into apache:master Nov 12, 2021
github-actions bot pushed a commit that referenced this pull request Nov 12, 2021
## [1.9.5](v1.9.4...v1.9.5) (2021-11-12)

### Bug Fixes

* remove_filtered_policy_returns_effects inconsistent input with remove_filtered_policy ([#211](#211)) ([e7e6696](e7e6696))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.9.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Abingcbc Abingcbc deleted the remove_filtered_policy_returns_effects branch November 12, 2021 12:00
Chimou0 pushed a commit to Chimou0/pycasbin that referenced this pull request Jul 17, 2025
…emove_filtered_policy (apache#211)

Signed-off-by: abingcbc <abingcbc626@gmail.com>
Chimou0 pushed a commit to Chimou0/pycasbin that referenced this pull request Jul 17, 2025
## [1.9.5](apache/casbin-pycasbin@v1.9.4...v1.9.5) (2021-11-12)

### Bug Fixes

* remove_filtered_policy_returns_effects inconsistent input with remove_filtered_policy ([apache#211](apache#211)) ([e7e6696](apache@e7e6696))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants