Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-41219

A site administrator cannot edit articles with global structure

    Details

      Description

      A site administrator does not have view permissions for structures and templates in the global scope. Without this permission, the article editor onlöy displays the articles title, but not the content. In the log file, the following exception will be displayed (reported twice):

      19:07:26,475 ERROR [http-bio-8080-exec-6][IncludeTag:92] Current URL /web/hasemerkur/home?p_p_auth=AQKdpm3o&p_p_id=15&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&doAsUserId=3xOFM4nOP9IFUyzvxC4IXQ%3D%3D&_15_groupId=10504&_15_redirect=http%3A%2F%2Flocalhost%3A8080%2Fweb%2Fhasemerkur%2Fhome%3Fp_p_id%3D56_INSTANCE_Pkt6OansQFSO%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D1%26doAsUserId%3D3xOFM4nOP9IFUyzvxC4IXQ%253D%253D&_15_struts_action=%2Fjournal%2Fedit_article&_15_articleId=10518&_15_version=1.0 generates exception: com.liferay.portal.security.auth.PrincipalException
      com.liferay.portal.security.auth.PrincipalException
              at com.liferay.portlet.dynamicdatamapping.service.permission.DDMStructurePermission.check(DDMStructurePermission.java:60)
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl.getStructure(DDMStructureServiceImpl.java:293)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.liferay.portlet.dynamicdatamapping.service.DDMStructureServiceUtil.getStructure(DDMStructureServiceUtil.java:271)
              at com.liferay.portlet.dynamicdatamapping.util.DDMXSDImpl.getXSD(DDMXSDImpl.java:542)
              at com.liferay.portlet.dynamicdatamapping.util.DDMXSDUtil.getXSD(DDMXSDUtil.java:174)
              at org.apache.jsp.html.taglib.ddm.html.end_jsp._jspService(end_jsp.java:523)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
      

      To reproduce this issue, you can start a fresh rc4 portal server; then:

      1. Log in as onmi admin and create a structure and template in teh global scope (Admin->Control Panle->Sites->Global->Site administration->Web content->Manage->[Structures|Templates]).
      2. Go back to the default 'Liferay' site and create and add a new web content that uses the structure and template of the last step.
      3. Create a new user 'site-admin'
      4. Switch back to the default 'Liferay' site and open the Site administration->Users accordeon.
      5. Add the newly created user to the site and assign the role 'Site Administrator' to that user
      6. Open the Control Panel again, select 'Users and Organizations' and impersonate the new user.
      7. The impersonated user has the right to edit the article (the tool bar is present). But when 'Edit' is chosen, a PrincipalException is thrown and the article editor opens without any content field.

      As workaround you have to create a new role, assign the user to that role and give that role the view and update permission for the structure and the template.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 32 weeks ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1