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.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton