We have been developing a web application in ASP.NET MVC. We have scenarios where many actions on web page are dependent upon role of a specific user. For example a memo page has actions of edit, forward, approve, flag etc. These actions are granted to different roles and may be revoked at some later stage.
What is the best approach to implement such scenarios?
if (IsUserInRole("role"))
around the button (or more likely put the actual implementation in your business layer not directly in the view). Users are perfectly able to have more than one role. Maybe have a read of Understanding Role Management – Carson63000 Mar 19 '11 at 10:36