aspose file tools
The moose likes JSF and the fly likes Authorization in JSF based on permission of a component Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Authorization in JSF based on permission of a component" Watch "Authorization in JSF based on permission of a component" New topic
Author

Authorization in JSF based on permission of a component

Robert Golabek
Greenhorn

Joined: Mar 03, 2006
Posts: 2
Hello,

I am trying to render components based on a permission.

so let say that
there are following permissions

Admin
Application-Read
Application-Write
Development

I need to set a permission for each component on a page.
Some user can only see the components that are ready only, others can see components that are for read/write users, and Admin person can see all the components that are on the page.

How would i do that in JSF. I have couple ideas that i am doing now, but i know that there are experts that have done this, and there must be an easy way of doing it.

I was thinking of extending my jsf components and add a attribute permission where i would be able to specify one ore more permission for each component(permissionAtt ("Admin,Application-Read"))
based on that i would then render the component by calling something like isAuthorized, which would check the permission of the user and the permission of the component. and then render it if it's true.

but this would mean that i have to modify a lot of components.

is there a easier way of doing this .

Thank you so much JSF experts

Robert
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Authorization in JSF based on permission of a component
 
Similar Threads
Controlling Access to Form fields?
Looking for some insight/advise on predetermining authorization
is there any certification on JSF?
how does the tapestry framework work?
"JSF" + "RIA" == lie