Arosboro
Arosboro

Reputation: 1045

How to implement node_acl in mean stack with node.js

I'd like to implement ACL with my MEAN application. I have a few questions regarding the implementation.

  1. How do I get acl with a mongodb backend instantiated in server.js so that I can use the same instance in my router and controllers?
  2. Does it make sense to create an acl controller that an administrator can use to create and assign roles, and change permissions?
  3. I would like all resources in my router.js to be exposed as acl resources with relevant actions. Does this happen automatically when you add acl.middleware() to the route?
  4. How can I define a permission like "edit own content"?

Here are a list of controller methods I have come up with to implement methods provided by ACL allowing an administrator to manage ACL settings:

Is there anything I am missing?

Upvotes: 1

Views: 3096

Answers (1)

vodolaz095
vodolaz095

Reputation: 6986

https://npmjs.org/package/acl it works with mongo db as backend

Upvotes: 1

Related Questions