2 Replies Latest reply on Oct 16, 2008 2:16 PM by Sanne Grinovero

    hiding pages

    Sanne Grinovero Master

      Please give me some hint about this very simple question:
      In my default-object.xml I have tried putting a <security-constraint> in a page tag.
      When logging in as a user the page is still in the menus, but empty.
      I would like to hide the page completely, and have it show in the menus only if an admin is logged in. Is this possible?

      default-object.xml

      <deployments>
       <deployment>
       <parent-ref>default.default</parent-ref>
       <if-exists>overwrite</if-exists>
       <page>
       <page-name>Admin</page-name>
       <window>
       <window-name>ParkingAdminWindow</window-name>
       <instance-ref>ParkingAdminInstance</instance-ref>
       <region>center</region>
       <height>0</height>
       <initial-window-state>maximized</initial-window-state>
       <properties>
       <property>
       <name>theme.renderSetId</name>
       <value>emptyRenderer</value>
       </property>
       </properties>
       </window>
       <security-constraint>
       <policy-permission>
       <action-name>viewrecursive</action-name>
       <action-name>personalizerecursive</action-name>
       <role-name>Admin</role-name>
       </policy-permission>
       </security-constraint>
       </page>
       </deployment>
      </deployments>

      portlet-instances.xml
      <deployments>
       <deployment>
       <if-exists>overwrite</if-exists>
       <instance>
       <instance-id>ParkingAdminInstance</instance-id>
       <portlet-ref>ParkingAdmin</portlet-ref>
       <security-constraint>
       <policy-permission>
       <action-name>admin</action-name>
       <role-name>Admin</role-name>
       </policy-permission>
       <policy-permission>
       <action-name>view</action-name>
       <role-name>Admin</role-name>
       </policy-permission>
       </security-constraint>
       </instance>
       </deployment>
      </deployments>