On our project we use ASP.NET Web Forms, Web Forms MVP. All data are getting from WCF service. All roles are handled by the noted service (e.g. Manager, Finance, etc.). We need to introduce role based representation to our UI.
To handle service calls security (e.g. methods to create/update some record) I’m going to use NInject Interception. However, I have some doubts how to be with controls. For example, we need to hide add, edit, delete buttons for a user who is not in Admin role. Or only Manager should see some special field and be able to click on some buttons.
I want to avoid to use if / switch operators in code behind files. I want to be able to add / change some rules of control displaying as fast as possible.
I thought about Dictionary to include all rules for some control.
Could someone suggest good way to solve the issue?