user366312
user366312

Reputation: 16918

C# WinForms User/Permission management

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.

Upvotes: 13

Views: 30822

Answers (1)

Robert Harvey
Robert Harvey

Reputation: 180808

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/
.

alt text
(source: simple-talk.com)

Upvotes: 23

Related Questions