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.54k stars 212 forks source link

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

Open mdg-mdrozd opened 8 months ago

mdg-mdrozd commented 8 months 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 8 months ago

@nodece @Shivansh-yadav13