Author: DannyT | Posted on: 6/16/2008 11:05:37 AM | Views : 426

I'd like to scatter some in-context edit buttons and such like throughout an application we're developing.
The edit button's visibility will be based on user roles, so an admin will see all and have access to all functions, a 'document creator' will have access to the new document and edit document buttons, 'News Manager' will be able to create only news items and so on.
Obviously this isn't rocket science to achieve but does anyone know of any patterns or practices for achiving this functionality with a lot of configurability.
Ideally I'd like to see the application roles defined in web.config (or other config file/db table) which can be mapped to roles setup in AD so we don't have to worry about strict group naming conventions and the like.

Another idea I'm thinking to perhaps create 'role aware' controls that can have their required role[s] and current user's role[s] injected:
<uc1:RoleA ...

Go to the complete details ...