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

Breaking change in casbin v2.55.0+ #6

Closed
zredinger-ccc opened this issue Sep 23, 2022 · 4 comments · Fixed by #7
Closed

Breaking change in casbin v2.55.0+ #6

zredinger-ccc opened this issue Sep 23, 2022 · 4 comments · Fixed by #7
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@zredinger-ccc
Copy link

err := a.loadFilteredPolicy(model, filterValue, persist.LoadPolicyLine)

It appears this is a breaking change for the adapter.

@pckhoi
Copy link
Owner

pckhoi commented Sep 24, 2022

I'm currently busy so I won't be able to address this anytime soon. Feel free to contribute of course.

@pckhoi pckhoi added help wanted Extra attention is needed bug Something isn't working labels Sep 24, 2022
@pckhoi
Copy link
Owner

pckhoi commented Sep 24, 2022

Also just so that we are on the same page, please add the error that you see in the issue description.

@edwardzjl
Copy link

Casbin v2.56.0 add an error return to their persist.LoadPolicyLine function, which will break this line:

func (a *Adapter) LoadFilteredPolicy(model model.Model, filter interface{}) error {
    ...
    err := a.loadFilteredPolicy(model, filterValue, persist.LoadPolicyLine)
    ...
}

See their issue and PR

I've made a PR to fix this problem

@pckhoi pckhoi closed this as completed in #7 Oct 13, 2022
@pckhoi
Copy link
Owner

pckhoi commented Oct 13, 2022

Thanks @edwardzjl! CI failed to make an automatic release but your changes should be available in at version v2.2.0.

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

Successfully merging a pull request may close this issue.

3 participants