ASP.Net 会员资格和角色管理

发布于 2024-08-20 01:32:47 字数 335 浏览 1 评论 0原文

寻找有关 ASP.Net 2.0 内置成员资格和角色管理的一些反馈。

很多人都用它吗? 它有什么好处和/或坏处? 我可以为单个用户分配多个角色吗? .Net 应用程序的替代规范是什么?

我个人喜欢为角色定义权限或操作的想法。似乎如果我只能为用户分配一个角色,并且我希望角色相互继承权限,那么使用内置的会员管理器进行管理将是一件非常令人头疼的事情。

如果我有以下角色..

出版商 编辑 成员

和我希望编辑器拥有发布者和成员拥有的一些权限以及它自己的一些权限,在我的代码中很难确定当前用户是否可以编辑某些内容,而不仅仅是拉入权限列表通过角色,只需检查“编辑文章”是否在列表中。

looking for some feedback on the built in membership and roles management for ASP.Net 2.0.

Do many people use it?
What is good and/or bad about it?
Can I assign multiple roles to a single user?
What is the alternative norm for .Net apps?

I personally like the idea of having defined permissions or actions to a role. Seems like if I could only assign a single role to a user and I wanted roles to inherit permissions from each other it would be a huge headache to manage using teh built in membership manager.

If I had the following roles..

Publisher
Editor
Member

and I wanted the Editor to have some the permissions that the Publisher and the Member had plus some of it's own, in my code It would be harder to determine if the current user can edit something rather than just have a list of permissions pulled in by a role and just checking to see if "Edit Article" is in the list.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

茶底世界 2024-08-27 01:32:47

内置的会员资格提供程序非常易于使用,而且相当安全。我在不同的项目中使用了它的几个版本。它的伟大之处在于,如果它不能完全满足您的需要,您可以随时扩展它。内置的 Identity 对象具有角色,它们很容易访问、存储、比较。

如果您使用 .Net 并且需要一个快速、预打包、相当安全的身份验证源,那么使用内置成员资格提供程序不会真的出错。如果您需要更多的安全性,只需接受他们给您的东西并使其变得更加硬核即可。如果您有 LDAP 存储,那么将现有的成员身份验证与 LDAP 存储集成起来甚至相当容易。

The built-in membership provider is very easy to use, and it's fairly secure. I've used several versions of it in different projects. The great thing about it is that if it doesn't do EXACTLY what you need it to do, you can always just extend it. The built-in Identity object has roles, they're easy to access, store, compare against.

If you're using .Net and you need a fast, prepackaged, reasonably secure authentication source, you can't really go wrong with the built-in membership provider. If you need more security, just take what they give you and make it a little more hard-core. It's even fairly easy to integrate the existing membership authentication with an LDAP store if you have one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文