fix issues

This commit is contained in:
yanghao05
2023-02-07 11:45:23 +08:00
parent ed3e7e3bbf
commit 2d52491536
7 changed files with 48 additions and 23 deletions

View File

@@ -71,6 +71,10 @@ func (cb *Casbin) Reload() error {
return nil
}
func (cb *Casbin) JsonPermissionsForUser(username string) (string, error) {
return casbin.CasbinJsGetPermissionForUser(cb.enforcer, username)
}
func (cb *Casbin) Update(roleID uint, infos []CasbinInfo) error {
roleIdStr := strconv.Itoa(int(roleID))
cb.Clear(0, roleIdStr)