C# WinForms User/Permission management

烂漫一生 提交于 2019-12-17 22:21:49

问题


Can anyone provide me an example WinForms application that implements the concept of User authentication and authorization one the basis of Roles or Groups?

The application should allow access of users to the main-menu on the basis of their roles.


回答1:


If you are building the menu from a database table, you can security trim it by joining it to another table or view that excludes records on the basis of the permissions set.

The diagram below illustrates the basics of setting up role permissions for users, and contains a couple of other tables for security trimming individual controls on the form as well.

Controls Based Security in a Windows Forms Application
http://www.simple-talk.com/dotnet/windows-forms/controls-based-security-in-a-windows-forms-application/
.



来源:https://stackoverflow.com/questions/1267952/c-sharp-winforms-user-permission-management

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!