title: issue with liferay portlet in popup
body: <p>I am facing issue with opening a custom portlet in popup window.</p>
  
  <p>Below is the code of opening popup.</p>
  
  <pre><code>LiferayPortletURL documentLibURL = PortletURLFactoryUtil.create(request, "portlet name with WAR name", themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);   
  documentLibURL.setWindowState(LiferayWindowState.POP_UP);   
  documentLibURL.setPortletMode(PortletMode.VIEW);
  
    AUI().use('aui-dialog', 'aui-io', 'event', 'event-custom', function(A) {
          var dialog = new A.Dialog({
                  width: 800,
                  height: 500,
                  title: 'Popup Title',
                  centered: true,
                  draggable: true,
                  modal: true
              }).plug(A.Plugin.IO, {uri: '&lt;%= documentLibURL.toString() %&gt;'}).render();
  
              dialog.show();
  
        });
  </code></pre>
  
  <p>When my portlet is not having any call to local services, portlet is being rendered in popup. But after adding some complex code. Portlet is giving permission error.
  "You do not have the roles required to access this portlet."</p>
  
  <p>1) I have also added true in liferay-portlet.xml.</p>
  
  <p>2) I have assigned permissions to guest user for view from control panel.</p>
  
  <p>Please let me know if any changes requires.</p>
  
  <p>Thanks in advance</p>