4 Replies Latest reply on Mar 4, 2008 1:38 PM by peterj

    Hide portlet

    ryousure2000

      How do I hide/show protlet based roles.

        • 1. Re: Hide portlet
          peterj

          Set the security for the portlet instance. If the role has access to the portlet instance, the portlet will show; if not then it will not show.

          • 2. Re: Hide portlet
            ryousure2000

            I tried but instead of hiding the portlet ,
            I am getting following error page

            HTTP Status 403 -

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

            type Status report

            message

            description Access to the specified resource () has been forbidden.

            • 3. Re: Hide portlet
              ryousure2000

              I defined security roles in portlet.xml and *-object.xml. which file I need to modify for portlet instance. THanks

              • 4. Re: Hide portlet
                peterj

                Regarding the 403 error, it looks like you changed one of the portal properties. Under Page Error Handling, the "When access to the window is denied" case needs to have the action "Remove the resource from the page"; you have the action set to "Display the default error message."

                You can specify security constraints for instances in the portlet-instances.xml file.