从前端为用户分配插入/更新/删除权限 [英] Assign insert/update/delete rights to user from front end

查看:108
本文介绍了从前端为用户分配插入/更新/删除权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个web app.my的要求是开发一个Web表单,为每个页面分配用户的插入/更新/删除权限,同时指定菜单隐藏/取消隐藏权限ie如果用户对此特定权限该菜单中该用户可以看到该页面的页面链接。从哪里开始?如何实现这个任务?任何想法或建议?请帮助...





提前致谢...

解决方案

< blockquote>查看此处 [ ^ ]了解有关如何构建应用程序的一些信息。



您需要在Utilities块中添加一个或多个库。我很确定.Net有用于身份验证的类,但您也可以使用登录凭据从数据库中获取用户权限。将这些存储在字典中,并使用唯一的登录凭据作为密钥(并将(成功的)登录凭据保留在会话对象中。)并将用户权限作为值。然后,您可以通过将会话对象传递到库来检索应用程序中任何给定时间的用户权限。



这只是一个快速示例,有许多变化。



希望这会有所帮助。



PS:考虑给用户角色并使用角色来定义用户权利。

I am developing a web app.my requirement is to develop a web form to assign insert/update/delete rights to user for each page,also assign menu hide/un hide right i.e..if user has this right for a particular page link to that page will be visible to that user in menu. From where to start ? How to achieve this task? Any ideas or suggestions? Please Help...


Thanks in advance...

解决方案

Look here[^] for some info on how the application should be structured.

You need to add a library or classes to the Utilities block. I'm pretty sure .Net has classes for authentication, but you could also use the login credentials to get the user rights from the database. Store those in a dictionary with the unique login credential as key (and keep the (succesful) login credential in a session object.) and the user rights as value. Then you can retrieve the user rights at any given time in your application by passing the session object to the library.

This is just a quick example there are many variations.

Hope this helps.

PS: consider giving users roles and use the roles to define the user rights.


这篇关于从前端为用户分配插入/更新/删除权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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