Hi guys, I’m new to all of this, PrettyFaces, JSF. Is it possible to configure PrettyFaces at runtime, each of my users, could have a diferent configuration, based on the rights they have on the application. Is it possible?
I made this possible using a PHP application I’ve developed with Zend Framework.
Yes, this is possible, but currently not very convenient. PrettyFaces does not have a native API to support this, but more and more people are asking for it, so it sounds like we should probably start trying to address it.
Right now, you’ll have to set a new configuration into the PrettyContext manually. PrettyContext.setConfig(), but this will be global for all users. There is only one central configuration. Separate users will be tricky, but not impossible… could I ask you to describe your use-case a little bit more? I might be able to give you a better answer.
For example, why are you doing this? How do your URLs look, in which situations?
Let’s imagine my approot url is http://myportal.com , ok? So, this portal, has many “modules” inside it, let’s imagine that one of this modules is, the user access tracking report, that I would activate by the following URL: http://myportal.com/userTracking . So, the router will wask, okay, the current user have access to which version of this module?
Then in my database, I give access of the modules version by user role, so, if the current user is a developer or a tester (that wants to check, how the new version will work in the production enviroment) the router will redirect to the version 2.0 of the module. But if the user is a manager (that would like to see the stable version) then it will redirect to the version 1.0 .