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

*gormadapter.Adapter is not persist.UpdatableAdapter: missing method UpdatePolicies #81

Closed
saeedgeek opened this issue Mar 12, 2021 · 3 comments · Fixed by #92
Closed
Assignees
Labels

Comments

@saeedgeek
Copy link

panic: interface conversion: *gormadapter.Adapter is not persist.UpdatableAdapter: missing method UpdatePolicies
in version v2.25.2
its work for me in v2.21.0
thanks

@hsluoyz
Copy link
Member

hsluoyz commented Mar 12, 2021

@closetool

@hsluoyz hsluoyz transferred this issue from casbin/casbin Mar 12, 2021
@hsluoyz hsluoyz added the bug label Mar 12, 2021
@hsluoyz hsluoyz changed the title [Bug] *gormadapter.Adapter is not persist.UpdatableAdapter: missing method UpdatePolicies Mar 12, 2021
@aryan828
Copy link

aryan828 commented Mar 25, 2021

@saeedgeek Can you share both the working and non-working versions of your code so that I can track the error.
Also @hsluoyz , have you implemented the UpdatePolicy() and UpdatePolicies() API, because it is mentioned in docs but what I found was
func (a *Adapter) UpdatePolicy(sec string, ptype string, oldRule, newPolicy []string) error { return errors.New("not implemented") }
for UpdatePolicy and
func (a *Adapter) UpdatePolicies(sec string, ptype string, oldRules, newRules [][]string) error { return errors.New("not implemented") }
for UpdatePolicies in latest version. And UpdatePolicies was missing in v2.21.0

@hsluoyz
Copy link
Member

hsluoyz commented Mar 26, 2021

@aryan828 yeah, so we need to implement UpdatePolicies().

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 a pull request may close this issue.

3 participants