Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
我也在寻找一些简单的 ACL 模块,但确实没有很多足够简单的模块。没有一个标榜“简单”或“最小”的模块确实如此。有些只是端口。
所以我写了一个:
这个模块非常简单,只有 3 个重要的 API:
acl.grant('someone', 'something', callback);
acl.revoke('someone', 'fromSomething',callback);
acl.assert('someone', 'canAccessSomething', function(e, ok) { })
-ok === true 如果您之前有
grant()
-ed 某些内容,则ok === false
否则。对于其他 API,请查看 GitHub 上的自述文件:
https://github.com/chakrit/simple-acl
请原谅这个无耻的插件:)
欢迎提出建议。
I was looking for some simple ACL module as well but there really weren't many that's simple enough. None of the modules touting "simple" or "minimimal" really were. Some are just ports.
So I wrote one:
This module is so simple it only has 3 important APIs:
acl.grant('someone', 'something', callback);
acl.revoke('someone', 'fromSomething', callback);
acl.assert('someone', 'canAccessSomething', function(e, ok) { })
-ok === true
if you havegrant()
-ed something earlier andok === false
otherwise.For other APIs, check the readme on GitHub:
https://github.com/chakrit/simple-acl
Pardon the shameless plug :)
Suggestions welcome.
我不能特别保证其中任何一个,但我标记的两个是:
https://github。 com/OptimalBits/node_acl
https://github.com/cellkast/node-acl
I can't vouch for any of these in particular, but two that I've tagged are:
https://github.com/OptimalBits/node_acl
https://github.com/cellkast/node-acl
在这里
https://github.com/scottkf/ability-js
Here you go
https://github.com/scottkf/ability-js
你应该看看node_acl:
https://npmjs.org/package/acl
https://github.com/optimalbits/node_acl
还支持 Express 中间件和基于 Redis/Mongo/内存的后端作为通用接口。
You should have a look at node_acl:
https://npmjs.org/package/acl
https://github.com/optimalbits/node_acl
Supports express middleware and Redis/Mongo/in-memory based backends, as well as a generic interface.
根据 npm 注册表 和 模块 页面。
It looks like there isn't according to npm registry and modules page.