1 Reply Latest reply on Sep 3, 2009 4:48 PM by Phil Haigh

    Login restriction

    Kmali Malik Newbie


      Hi,


      I want that users that are not logged in, can't view any other Page than the login page.


      So I've tried this:


      <!DOCTYPE pages PUBLIC
                "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
                "http://jboss.com/products/seam/pages-1.2.dtd">
      
      <pages no-conversation-view-id="/home.xhtml"
                       login-view-id="/login.xhtml">
      
          <page view-id="*">
              <navigation>
                  <rule if-outcome="home">
                      <redirect view-id="/home.xhtml"/>
                  </rule>
              </navigation>
          </page>
          
          <page view-id="/login.xhtml">
          
              <navigation>
                  <rule if="#{identity.loggedIn}">
                      <redirect view-id="/home.xhtml"/>
                  </rule>
              </navigation>
              
          </page>
          
          <page view-id="/home.xhtml">
               login-required="true">
               
               <navigation>            
                    <rule if-outcome="solution">
                         <end-conversation/>
                         <redirect view-id="/solution.xhtml" />
                    </rule>



      It seems that:


      login-required="true">



      is not recognized...


      How can I implement this functionality?
      I use Seam 1.2 and Jboss 4.0.5GA.


      Thank you