How to hide or display jsf pages based on type of user question
Joined: Mar 19, 2009
I'm using a standard template that displays links a user can navigate to inside a footer. Is there a way to hide links (pages) based on the type of user logged into the web site. Below is a snippet of how the pages are displayed in the footer.
Actually, JSTL on a JSF page is a bad thing. Especially since there are high-level JSF components to do things like menus so you don't have to create them the hard way out of component atoms.
If you're using container-based security, there's support for testing the user roles. Some JSF component libraries (including MyFaces Tomahawk) have the ability to code those tests as JSF attributes. When that's not possible you have to supply your own solution, which might be simply having the backing bean present is "userRole" property. Or better yet, filter the menu's datamodel and leave the logic off the JSF page entirely.
If you're using DYI (in)security, your solution will depend on the implementation of your custom security system.
Customer surveys are for companies who didn't pay proper attention to begin with.