Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Restrict everything except login page

scott.stark@jboss.org

2007-07-18


Hi, this should be straightforward but I can't figure out a simple way to do it.

I want to restrict all my xhtml pages to users of a certain role, except the login page (obviously). Is there anyway to override the restrict that I have for view-id="*".

If using the pages.xml below trying to access the login page throws a NotLoggedInException


Seam 1.2.1

<pages login-view-id="/login.xhtml">
|  <page view-id="/login.xhtml">
|    <navigation from-action="#{identity.login}">
|      <rule if-outcome="loggedIn">
|        <redirect view-id="/search.xhtml"/>
|      </rule>
|    </navigation>
|  </page>
|
|  <page view-id="*" login-required="true">
|       <restrict>#{s:hasRole('admin')}</restrict>
|    <navigation from-action="#{identity.logout}">
|      <redirect view-id="/login.xhtml" />
|    </navigation>
|  </page>
| </pages>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065605#4065605

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065605
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.