You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set redis watcher for casbin,when redis service crash, casbin delete user report error,but the user is deleted successful
This is an operation to update a user role. Subsequent operations to add a role for the user cannot be performed properly, and the previous operations to delete the user cannot be rolled back. What should I do in this case
// step1: delete the role owned by the original user
if _, err := mycasbin.Casbin().DeleteRolesForUser(strconv.Itoa(roleId)); err != nil {
return
}
// step2: update the roles owned by the user
_, err = mycasbin.Casbin().AddRolesForUser(strconv.Itoa(roleId), req.PermissionList)
if err != nil {
return
}
Want to prioritize this issue? Try:
What's your scenario? What do you want to achieve?
Your answer here
Your model:
The text was updated successfully, but these errors were encountered: