Everyone here seems to forget that there is css for such stuff. You can do the thing you want very easily, at least I am doing at already, and it's working flawlessly.
Let me give you a simple example
- Make sure your operations buttons/regions have defined css classes
css class: MODULE-OPERATION
e.g.
Module User
Operations: Add, Edit, Delete, List
<a href="/user/add" class="USER-ADD">Add User</a>
Whenever changing (adding/updating/deleting) roles, you generate a css file for each role
e.g.
You decide that only administrators can add users so this css is generated
//admin_css.css
.USER-ADD { display: none; }
Everytime the page is opened you check what role the user has, and based on the role, you load the css file in you header. So your gui correlates to the logic you have in your application without so much hassle.