casbin / node-casbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Node.js and Browser
https://casbin.org
Apache License 2.0
2.63k stars 219 forks source link

enforcer.deleteUser() wiped out all data from `casbin_rule` table #462

Open mdg-mdrozd opened 1 year ago

mdg-mdrozd commented 1 year ago

Logged queries shows that following queries are executed when calling enforcer.deleteUser()

DELETE from casbin_rule WHERE ptype = 'p';
DELETE from casbin_rule WHERE ptype = 'g'; 
casbin-bot commented 1 year ago

@nodece @Shivansh-yadav13