RbacApi::delete_user() does not remove grouping policy
bk138 opened this issue · comments
While adding a role to a user and then deleting the user works when using FileAdapter, it fails when using sqlx-adapter. I've prepared a minimal sample project here that shows the issue.
Steps to repro
- Assign a role to a user via add_role_for_user()
- Call delete_user()
Expected outcome
- 'g' policy is deleted, see https://github.com/casbin/casbin-rs/blob/master/src/rbac_api.rs#L478
Actual outcome
- 'g' policy is deleted when using FileAdapter, but not when using sqlx-adapter
Related
There was a similar issue for node-casbin: casbin/node-casbin#118
@smrpn @hackerchai @PsiACE @GopherJ
While adding a role to a user and then deleting the user works when using FileAdapter, it fails when using sqlx-adapter. I've prepared a minimal sample project here that shows the issue.
Steps to repro
Assign a role to a user via add_role_for_user()
Call delete_user()
Expected outcome
- 'g' policy is deleted, see https://github.com/casbin/casbin-rs/blob/master/src/rbac_api.rs#L478
Actual outcome
- 'g' policy is deleted when using FileAdapter, but not when using sqlx-adapter
Related
There was a similar issue for node-casbin: casbin/node-casbin#118
We are working on this