We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i've used this mongoose adapter to handle rules in mongodb, I can't delete roles, what i'm doing wrong?
static async getInstance() { const adapter = await Adapter.newAdapter(db.uri, db.config); const model = `${process.env.STORAGE_PATH}/casbin/rbac.conf`; return casbin.newEnforcer(model, adapter); }
Assign roles works properly.
static async assignRole(identifier, role, domain = '*') { const enforcer = await Enforcer.getInstance(); return enforcer.addRoleForUser(identifier, role, domain); }
deleteRoleForUser returns false
static async revokeRole(identifier, role, domain = 'admin') { const enforcer = await Enforcer.getInstance(); console.log(identifier, role, domain); return enforcer.deleteRoleForUser(identifier, role); }
deleteRolesForUser returns false
static async revokeRoles(identifier) { const enforcer = await Enforcer.getInstance(); return enforcer.deleteRolesForUser(identifier); }
The text was updated successfully, but these errors were encountered:
@fdorantesm This repo seems to be dead. Use this instead: https://github.com/node-casbin/mongoose-adapter
Sorry, something went wrong.
No branches or pull requests
Hi, i've used this mongoose adapter to handle rules in mongodb, I can't delete roles, what i'm doing wrong?
Assign roles works properly.
deleteRoleForUser returns false
deleteRolesForUser returns false
The text was updated successfully, but these errors were encountered: