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

wrong type check of adapter #57

Open
VantagePOS opened this issue Aug 14, 2024 · 1 comment
Open

wrong type check of adapter #57

VantagePOS opened this issue Aug 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@VantagePOS
Copy link

In core_enforcer.dart, the type of the adapter is checked using adapter.runtimeType == FilteredAdapter, which would expect an exact match of FilteredAdapter, however FilteredAdapter is an abstract class so this will never evaluate to true.

This should be changed to: adapter is FilteredAdapter

Needs to be changed in two places:

if (adapter.runtimeType == FilteredAdapter) {

if (adapter.runtimeType == FilteredAdapter) {

@casbin-bot casbin-bot added the bug Something isn't working label Aug 14, 2024
@hsluoyz
Copy link
Member

hsluoyz commented Aug 14, 2024

@VantagePOS can you make a PR to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants