-
Notifications
You must be signed in to change notification settings - Fork 19
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
TyperError: this.adapter.isFiltered is not a function #6
Comments
After reviewing this more with other devs. I have found that really if this MongoAdapter is meant to be a So instead of
it should be
then adjust to that interface accordingly. |
Any news on that? |
@sapcik It seems that the developer is inactive for some time. You can take a look at theother 2 MongoDB adapters at: https://casbin.org/docs/en/adapters |
True, I am getting the issue of auto-save not working for deleted policies. it forces me to use enforcer.savePolicy() method to push all the policies to MongoDB which takes a lot of time to process. The expectation was to get deleted policies auto-saved WIth Casbin 5.0.3 Exactly same issue - "this.adapter.isFiltered is not a function" is showing while using enforcer.savePolicy() Due to this reason, I am completely blocked. Cannot use this adapter as this is not getting updated with the latest casbin. |
ping @juicycleff |
@alokadhao20 are you claiming the same issue about |
Yes @hsluoyz |
@juicycleff @alokadhao20 @csmcgee isFiltered in a function in casbin-filter |
Hi all, I am looking at fixing this today. Will make an update at the end of today |
fix: juicycleff#6 TypeError: this.adapter.isFiltered is not a function
Please see #10 |
I was attempting to use the RBAC management api and noticed that the delete was not persisting (autosave I guess doesn't work for
deleteUser
). So I attempted to usesavePolicy
and got the following error:Diving deeper I noticed that node-casbin expects
isFiltered
to be a function see https://github.com/casbin/node-casbin/blob/master/src/coreEnforcer.ts#L184.Current state of
isFiltered
in the adapter.Workaround for those interested:
I'm not currently using filtered yet... so I'm not sure how useful this will be to anyone.
The text was updated successfully, but these errors were encountered: