1 Reply Latest reply on Nov 17, 2011 5:39 AM by Nick Scavelli

    Setting access permission for a page

    Dhanya Sreejith Newbie

      hiii...

             Herewith I'm attaching a screenshot of a menu..... I've configured 4 xml files (portlet.xml, pages.xml, portal.xml & navigation.xml) to display all of my portlets in my application deployed in GateIn 3.1 .......

       

      my pages.xml is as follows :

      --------------------------------------

       

      <page>

            <name>Conf</name>

            <title>Conf</title>

            <access-permissions>Administrator:/ABC;Operator:/ABC;</access-permissions>

            <edit-permission>Administrator:/ABC</edit-permission>

            <show-max-window>false</show-max-window>

            <container id="ConfContainer" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">

               <access-permissions>Administrator:/ABC</access-permissions>

               <container id="Conf1Container" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">

                  <access-permissions>Administrator:/ABC</access-permissions>

                  <portlet-application>

                     <portlet>

                        <application-ref>abc</application-ref>

                        <portlet-ref>Conf1Portlet</portlet-ref>

                     </portlet>

                     <title>Conf1</title>

                     <access-permissions>Administrator:/ABC</access-permissions>

                     <show-info-bar>true</show-info-bar>

                     <show-application-state>true</show-application-state>

                     <show-application-mode>true</show-application-mode>

                     <description>Conf1 Portlet</description>

                  </portlet-application>

               </container>

      </page>

      <page>

            <name>Conf2</name>

            <title>Conf2</title>

            <access-permissions>Administrator:/ABC;Operator:/ABC</access-permissions>

            <edit-permission>Administrator:/ABC</edit-permission>

            <show-max-window>false</show-max-window>

                <container id="Conf2Container" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">

                  <access-permissions>Administrator:/ABC;Operator:/ABC</access-permissions>

                  <portlet-application>

                     <portlet>

                        <application-ref>abc</application-ref>

                        <portlet-ref>Conf2Portlet</portlet-ref>

                     </portlet>

                     <title>Conf2</title>

                     <access-permissions>Administrator:/ABC;Operator:/ABC</access-permissions>

                     <show-info-bar>true</show-info-bar>

                     <show-application-state>true</show-application-state>

                     <show-application-mode>true</show-application-mode>

                     <description>Conf2 Portlet</description>

                  </portlet-application>

               </container>

      <page>

      <page>

            <name>Conf3</name>

            <title>Conf3</title>

            <access-permissions>Administrator:/ABC;Operator:/ABC</access-permissions>

            <edit-permission>Administrator:/ABC</edit-permission>

            <show-max-window>false</show-max-window>

                <container id="Conf3Container" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">

                  <access-permissions>Administrator:/ABC;Operator:/ABC</access-permissions>

                  <portlet-application>

                     <portlet>

                        <application-ref>abc</application-ref>

                        <portlet-ref>Conf3Portlet</portlet-ref>

                     </portlet>

                     <title>Conf3</title>

                     <access-permissions>Administrator:/ABC;Operator:/ABC</access-permissions>

                     <show-info-bar>true</show-info-bar>

                     <show-application-state>true</show-application-state>

                     <show-application-mode>true</show-application-mode>

                     <description>Conf3 Portlet</description>

                  </portlet-application>

               </container>

      </page>

       

      my navigation.xml is as follows :

      -------------------------------------------------

      <node>

                <uri>Conf</uri>

                <name>Conf</name>

                <label>Conf</label>

                <visibility>DISPLAYED</visibility>

                <page-reference>portal::ABC::Conf</page-reference>

                <node>

                     <uri>Conf/Conf1</uri>

                     <name>Conf1</name>

                     <label>Conf1</label>

                     <visibility>DISPLAYED</visibility>

                     <page-reference>portal::ABC::Conf</page-reference>

                </node>

                <node>

                     <uri>Conf/Conf2</uri>

                     <name>Conf2</name>

                     <label>Conf2</label>

                     <visibility>DISPLAYED</visibility>

                     <page-reference>portal::ABC::Conf2</page-reference>

                </node>

                <node>

                     <uri>Conf/Conf3</uri>

                     <name>Conf3</name>

                     <label>Conf3</label>

                     <visibility>DISPLAYED</visibility>

                     <page-reference>portal::ABC::Conf3</page-reference>

                </node>

      </node>

       

       

                               We've a main menu 'Conf' under which comes 3 pages - Conf1, Conf2 & Conf3....  according to our requirement, on clicking the main menu 'Conf', the default page to be displayed is 'Conf1' ... On clicking 'Conf1' also, the page to be navigated is 'Conf1'..... all these were successfully implemented..... but the problem arises on trying to set access permissions to these pages.....

       

      Access permissions set are as follows :

                       Conf    ------   Administrator, Operator

                       Conf1  -------  Administrator

                       Conf2  -------- Administrator, Operator

                       Conf3  -------- Administrator, Operator

       

      On logging in as a User with only Operator access permission, on clicking 'Conf', 'Conf1' gets displayed in menu ...... we expect 'Conf1' not to be displayed in menu since it has only Administrator access permission........  how can we achieve this ?

        • 1. Re: Setting access permission for a page
          Nick Scavelli Novice

          All your pages: Conf, Conf2 and Conf3 have the same access permissions (admin and operator).  The navigation you will see is dictated by the access of the page (not the portlets).  If a user has access to a page, that navigation node will appear.

           

          Not sure what you are trying to achieve, as both conf and conf1 navigation nodes point to the same page, but for some reason you want different visiblity behaviour...