Splash › Forums › PrettyFaces Users › Use pretty to build a security filter
Tagged: Prettyfaces, SecurityFilter
This topic contains 2 replies, has 2 voices, and was last updated by nicog 11 years, 2 months ago.
I’d like to build a global url pattern that allows an action to check if user is logged in and if no redirect to login page.
I saw PrettyFaces examples that show this for one url mapping.
My point is that I need a “super” url mapping that use all others url mapping..
<pattern value="/*" />
<pattern value="/admin" />
Meaning that “security” url mapping id will be triggered before “admin” id and therefore redirect user if not logged and if pointing to /admin
Is that possible with PrettyFaces.
Thanks a lot for your answers
@nicog: You have one real option right now.
With version 3.1.1 (Currently 3.1.1-SNAPSHOT is available) you can add a ConfigurationPostProcessor which will add an Action to every URL-mapping:
In the postProcessor, you would need to loop over all the elements in the configuration and add a “new UrlAction()” to your desired mappings.
We are currently working on supporting inheritable actions via prettyfaces configuration, but it’s a complex issue and will probably need to wait for 3.1.2.
there are great additional features in 3.1.1-SNAPSHOT!
I will use this for sure to add it to all my mappings
ConfigurationProvider is also great…job
Thks a lot!
The forum ‘PrettyFaces Users’ is closed to new topics and replies.
Comments are closed.
If you find our tools useful, please consider making a donation to help us stay online and building software!