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

nakhnoukh do-not-reply at jboss.com
Wed Jul 18 19:50:17 EDT 2007


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



More information about the jboss-user mailing list