2 Replies Latest reply on Dec 28, 2008 3:21 PM by pmn92

    How to get the same portlet security context in servlet

    fixxer

      I've got a portlet with some ajax.
      I perform a ajax request to a servlet, and from sevlet I need an access to CMS,
      but I get CMSException: Access denied, however I can do it from portlet, when I log in into portal. How can I make so that servet acted as authenticated in portal?

      Thanks.

        • 1. Re: How to get the same portlet security context in servlet

           

          import org.jboss.portal.cms.impl.interceptors.ACLInterceptor;
          ...
          // turn off CMS ACL control
          ACLInterceptor.turnOff();
          


          Hope this helps!

          • 2. Re: How to get the same portlet security context in servlet

            Also you need to turn off the CMS Publish/Approval Workflow feature

            The CMS Publish/Approval Workflow feature can be deactivated by commenting out the ApprovePublishWorkflow
            attribute of the portal:service=CMS mbean in portal-cms.sar/META-INF/jboss-service.xml:

            <!-- Comment this out to deactivate publish/approval workflow integration
             <depends optional-attribute-name="ApprovePublishWorkflow" proxy-type="attribute">portal:service=ApprovePublish,type=Workflow</depends>
             -->