Hadrien Tulipe wrote:Hello everyone, I'm kind of new to JSF and have some trouble with concepts.
I have to create a web app where users can do several stuff.
I have a list of legit users (in db) which have an arbitrarily number of prerogatives (such as "create new user", "post a thread", "mail other people", etc...).
When an user logs in, I need to display a page that takes into account the authorized actions of the logged user. For instance, a user that does not have rights to create new users should not have the "create new user" form displayed. The number of prerogatives being quite big, I can't "hard-code" a page for each combination, I need to do it dynamically.
In the end, for a logged user, I want to display a page with one form per authorized action and I'm having a hard time doing it with JSF.
What I want to do is when a user logs in, the business logic checks the db for his authorized actions and generate the page accordingly.
How would you do such a thing?
Thank you very much
Brendan Healey wrote:.... Let's assume that you
have a login page which authenticates the user.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.