如何为c#中的每个人设置页面权限 [英] How to set page permission for each person in c#

查看:481
本文介绍了如何为c#中的每个人设置页面权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个包含4个aspx页面的项目。在那里,我分为两组用户级别权限和管理员级别权限,但现在我想为每个员工设置每个页面权限。任何人都可以建议吗?

I have created a project with 4 aspx pages. In that I divided into two sets user level permission and admin level permission but now I want to set each page permission for each employee. can anybody suggest some idea?

推荐答案

参考 - 如何在asp.net中设置页面级别权限#? [ ^ ]

Refer - how to set page level permission in asp.net c#?[^]
Quote:

您最好的选择是使用会员提供商修改您的网站。

Your best option will be modify your site by using Membership Providers.


通常当您与两个或三个以上的人合作时,您不会单独设置权限,您创建一组人并分配权限或撤销他们的许可。这使您可以控制谁具有访问权限,谁不具有访问权限以及谁可以具有访问权限。



创建一个团队就像拥有团队一样。您将人员添加到该团队,他们获得该团队的权利并按照他们的要求工作。许多其他公司使用此技术,或者我应该说,您在组级别控制访问权限并将用户添加到特定组的所有公司。想象一下,一群人 - 管理员,团队成员,编辑,主持人,用户,被阻止等。



编写代码然后检查唯一的UserID允许/禁止客户端访问项目中的数据永远不是一个好主意。
Usually when you're working with more than two or three people, you don't set permissions to them individually, you create a Group of people and assign the permission or revoke a permission from them. This lets you control who has the access, who doesn't and who might have any access.

Creating a group is just like having teams. You add people to that team and they get the rights of that team and work as they're asked to. This technique is used by many other companies or should I say, by all of the companies where you control the access rights at a group level and add the user to a particular group. Think of it like, Group of people who are - Admin, TeamMember, Editor, Moderator, User, Blocked etc.

Writing a code and then checking for a unique UserID to allow/disallow the client from accessing a data in your project will never be a good idea.


这篇关于如何为c#中的每个人设置页面权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆