Skip to content

feat: implement IPolicyFilter in PolicyFilter#386

Merged
hsluoyz merged 2 commits intoapache:masterfrom
seniorquico:fix-policyfilter-type
Sep 24, 2025
Merged

feat: implement IPolicyFilter in PolicyFilter#386
hsluoyz merged 2 commits intoapache:masterfrom
seniorquico:fix-policyfilter-type

Conversation

@seniorquico
Copy link
Contributor

This fixes #385, implementing the IPolicyFilter interface in the PolicyFilter class so that it may be used with the filtered extension methods.

This also adds a set of very basic policy filtered tests for each of the built-in adapter types.

@hsluoyz hsluoyz requested a review from Copilot September 23, 2025 17:19
@hsluoyz
Copy link
Member

hsluoyz commented Sep 23, 2025

@FAUST-BENCHOU plz review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issue #385 by implementing the IPolicyFilter interface in the PolicyFilter class, enabling its use with filtered extension methods. The change ensures that the PolicyFilter class conforms to the expected interface contract for policy filtering operations.

  • Made PolicyFilter implement IPolicyFilter interface
  • Added comprehensive test coverage for filtered policy operations across all built-in adapter types

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Casbin/Persist/PolicyFilter.cs Implements IPolicyFilter interface in PolicyFilter class
Casbin.UnitTests/PersistTests/AdapterTest.cs Adds filtered policy tests for FileAdapter, StreamAdapter, and TextAdapter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hsluoyz hsluoyz changed the title fix: implement IPolicyFilter in PolicyFilter feat: implement IPolicyFilter in PolicyFilter Sep 24, 2025
@hsluoyz hsluoyz merged commit 999b3f4 into apache:master Sep 24, 2025
8 checks passed
@github-actions
Copy link

🎉 This PR is included in version 2.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

PolicyFilter and IPolicyFilter

4 participants