-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
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
I need superadmin, what can i do with node_acl? #276
Comments
do nothing, go ahead your router without middleware |
@xiemoumou I don't think that's what @snowdream means. I believe they have a case where some resources require roles, but they need a role that has access to all resources. One way to do this is to add this const acl = require('acl');
const memoryBackend = new acl.memoryBackend();
const aclInstance = new acl(memoryBackend);
aclInstance.addRoleParents('superadmin','admin');
aclInstance.addRoleParents('superadmin','customer');
aclInstance.addRoleParents('superadmin','agent');
aclInstance.addRoleParents('superadmin','finance');
aclInstance.addRoleParents('superadmin','content');
module.exports = aclInstance; And use that instance for all your resources. I am sure there is a better way to achieve this, but this is one that works for now. |
@AbdelrahmanHafez i'm sorry for my misunderstanding,it works in your way. |
hey, there is a new module for this, view it in https://github.com/xiemoumou/node_acl |
@xiemoumou The link redirects to the current repo when clicked, people would need to copy & paste it in order to work, you probably need to edit it. |
I need superadmin, who have all permissions on all the resources.
what can i do with node_acl?
The text was updated successfully, but these errors were encountered: