3 Replies Latest reply on Sep 11, 2009 11:49 AM by tmalatinszki

    page restriction

    seamkaruna

      hi there,


      I'm using identity management is there any method to restrict page. Is there any possibility to give like this in target seam.pages

        • 1. Re: page restriction
          tmalatinszki

          You can use <restrict> tag in pages.xml:


          <page view-id="/pages/adminpage.xhtml">
             <restrict>#{identity.hasRole('adminRole')}</restrict>
          </page>



          Regards,
          Tamas

          • 2. Re: page restriction
            seamkaruna

            hi tamas,


            thanks for ur reply is it possible to pass parameter or dynamic value in hasRole() function.

            • 3. Re: page restriction
              tmalatinszki

              I've never tried it before, but I don't think that is possible.
              But why do You need it? Isn't enough that You can change the role values in identity component anytime (using addRole() and removeRole() functions), and leave the hasRole() expressions fixed in pages.xml?


              Regards,
              Tamas