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

feat: update_filtered_policies #249

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

Shivansh-yadav13
Copy link
Member

@Shivansh-yadav13 Shivansh-yadav13 commented Apr 6, 2022

@casbin-bot
Copy link
Member

@ffyuanda @Zxilly @elfisworking please review

@hsluoyz
Copy link
Member

hsluoyz commented Apr 6, 2022

@leeqvip plz review

@Shivansh-yadav13 Shivansh-yadav13 force-pushed the master branch 2 times, most recently from 4c10b79 to 84e2139 Compare April 7, 2022 07:22
@Shivansh-yadav13
Copy link
Member Author

do we plan to use update filtered policies for file adapters like for updating the policy file?

@hsluoyz
Copy link
Member

hsluoyz commented Apr 14, 2022

do we plan to use update filtered policies for file adapters like for updating the policy file?

@Shivansh-yadav13 no. Please add it to a popular ORM or database adapter listed in: https://casbin.org/docs/en/adapters . It's not very valuable to add it to a file adapter, because people usually don't use file adapter in production.

@hsluoyz
Copy link
Member

hsluoyz commented Apr 14, 2022

@Shivansh-yadav13 plz fix:

image

@Shivansh-yadav13
Copy link
Member Author

@hsluoyz fixed.

@leeqvip
Copy link
Member

leeqvip commented Apr 16, 2022

do we plan to use update filtered policies for file adapters like for updating the policy file?

@Shivansh-yadav13 It is only necessary to test whether the policy in the instance memory is as expected, ignoring the failure of the adapter and watcher

casbin/persist/adapters/update_adapter.py Show resolved Hide resolved
casbin/internal_enforcer.py Show resolved Hide resolved
@Shivansh-yadav13 Shivansh-yadav13 force-pushed the master branch 5 times, most recently from 1336e9e to bce0e79 Compare April 17, 2022 04:55
@Shivansh-yadav13
Copy link
Member Author

sorry I'm not able to understand why it goes to SyncedEnforcer

@leeqvip
Copy link
Member

leeqvip commented Apr 17, 2022

sorry I'm not able to understand why it goes to SyncedEnforcer

@Shivansh-yadav13 see: https://github.com/casbin/pycasbin/blob/master/tests/test_management_api.py#L311

@Shivansh-yadav13 Shivansh-yadav13 force-pushed the master branch 2 times, most recently from 4db42c7 to b24486b Compare April 18, 2022 11:08
@Shivansh-yadav13 Shivansh-yadav13 force-pushed the master branch 8 times, most recently from 34d1a62 to 36544ba Compare April 23, 2022 11:55
@Shivansh-yadav13 Shivansh-yadav13 changed the title feat: update_filtered_policies feat: update_filtered_policies & lint config file Apr 23, 2022
@Shivansh-yadav13 Shivansh-yadav13 force-pushed the master branch 6 times, most recently from 32777f2 to 0e1a1ed Compare April 26, 2022 04:00
@hsluoyz hsluoyz requested a review from leeqvip April 26, 2022 06:36
@leeqvip
Copy link
Member

leeqvip commented Apr 26, 2022

@Shivansh-yadav13 This PR has done too many things, can you divide it into multiple PRs?

@Shivansh-yadav13 Shivansh-yadav13 changed the title feat: update_filtered_policies & lint config file feat: update_filtered_policies Apr 26, 2022
@Shivansh-yadav13
Copy link
Member Author

Shivansh-yadav13 commented Apr 26, 2022

@leeqvip I have removed the commits for adding linting.

@leeqvip leeqvip merged commit ca84dac into casbin:master Apr 27, 2022
github-actions bot pushed a commit that referenced this pull request Apr 27, 2022
# [1.16.0](v1.15.5...v1.16.0) (2022-04-27)

### Features

* update_filtered_policies ([#249](#249)) ([ca84dac](ca84dac))
@github-actions
Copy link

🎉 This PR is included in version 1.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Shivansh-yadav13 added a commit to Shivansh-yadav13/pycasbin that referenced this pull request Apr 27, 2022
Shivansh-yadav13 pushed a commit to Shivansh-yadav13/pycasbin that referenced this pull request Apr 27, 2022
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.

Implement update_filtered_policies()
4 participants