node_acl
node_acl copied to clipboard
remove user
Hi, cannot find a function to remove a user. E.g. when a user unregisters I want to complete clean up everything from him also the db entries with _bucketname users.
Or do I have to delete it manually? Thank you.
I have same issue to remove the user from acl_users and acl-meta tables.
+1
Tried to clean it up by myself. But stuck in a performance issue deleting resources
const ressources = await aclhelper.acl.whatResources(accountRoleKey);
if (ressources != null && Object.keys(ressources).length > 0) {
for (let idx = 0; idx < Object.keys(ressources).length; idx++) {
await aclhelper.acl.removeAllow(accountRoleKey, Object.keys(ressources)[idx], "*");
// Takes >40sec having 3k roles
await aclhelper.acl.removeResource(Object.keys(ressources)[idx]);
}
}
https://github.com/OptimalBits/node_acl/issues/189