In my future web application there would be many user roles. Depending on user's role, webapp should restrict users's access to certain pieces of information. I need to implement following features:
- depending on role, user should see only columns and rows (in data grid) that are available for current role and user
- depending on role, user should view page in readonly or in editable mode
- depending on role, user should have visible/hidden some controls on a web page
In my previous applications (that were pretty simple) such problem was solved using many conditionals operators in codebehind files and in markup files also. It was quite difficult to maintain such code.
I'm wondering are there any complex solution for maintaining role-based security for all levels of apllication (data, logic, view) without messing up code with IFs.
ps both, solutions for java and .net platforms are interesting