[jboss-user] [JBoss Seam] - Re: Two login pages/methods
david.spark
do-not-reply at jboss.com
Thu Jan 17 06:49:08 EST 2008
I use Roles for this situation. Presumably you have some field in the database which indicates if someone is a user or an admin. If so then you can add an appropriate role in the Authenticate method of the Authenticator and have something like this in your login.page.xml:
<page>
| <navigation from-action="#{identity.login}">
| <rule if="#{identity.loggedIn and identity.hasRole('admin')}">
| <redirect view-id="/admin/HomePage.xhtml"/>
| </rule>
| <rule if="#{identity.loggedIn}">
| <redirect view-id="/user/HomePage.xhtml"/>
| </rule>
| </navigation>
| </page>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120825#4120825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120825
More information about the jboss-user
mailing list