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

Unsupported VIEW and PERMISSIONS Calendar Resource permissions for Guest when upgrade from 6.2 to 7.0

    Details

      Description

      After upgrade an environment from 6.2 to 7.0, when trying to create Sites based on a Site Template (with Calendar app in the Site Template pages) throws following exception:

      15:20:44,021 ERROR [http-nio-8080-exec-2][SitesImpl:1355] com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.portal.kernel.security.auth.PrincipalException: VIEWis not supported by role 10165
      

      This error is caused by import process of CalendarResource, that compares Unsupported Guest Permissions (VIEW is not supported in 7.0) with current Guest permissions (in 6.2, VIEW is supported).

      VIEW and PERMISSIONS were add to unsuported Guest permissions in -LPS-34739-. For more information see commit: https://github.com/liferay/liferay-portal/commit/d0216104e8327e2ffc0ef7bebc8497a31c04a0be

      To avoid this error, when upgrading a environment from 6.2 to 7.0, unsupported Guest permissions for Calendar application should change in DB. 

      Steps to reproduce

      1. - Install 6.2 Liferay bundle with Calendar App.
      2. - Create Site Template with a page.
      3. - Add Calendar to that page and create a Resource with VIEW permission for Guest.
      4. - Upgrade environment to Liferay 7.0.
      5. - Create Site based on Site Template created in 6.2.
        • Expected behavior: There is no errors in log
        • Wrong behavior: See log error: "VIEWis not supported by role ".
      15:20:44,021 ERROR [http-nio-8080-exec-2][SitesImpl:1355] com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.portal.kernel.security.auth.PrincipalException: VIEWis not supported by role 10165
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.portal.kernel.security.auth.PrincipalException: VIEWis not supported by role 10165
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:408)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:369)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:355)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:402)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:281)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importReferenceStagedModels(BaseStagedModelDataHandler.java:805)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:362)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:369)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:355)
      	at com.liferay.calendar.internal.exportimport.data.handler.CalendarPortletDataHandler.doImportData(CalendarPortletDataHandler.java:228)
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:382)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:290)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:826)
      	at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:822)
      	at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:224)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:185)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [...]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.security.auth.PrincipalException: VIEWis not supported by role 10165
      	at com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl.checkGuestSupportedPermission(ResourceBlockLocalServiceImpl.java:1053)
      	at com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl.setIndividualScopePermissions(ResourceBlockLocalServiceImpl.java:733)
      	at sun.reflect.GeneratedMethodAccessor1479.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy81.setIndividualScopePermissions(Unknown Source)
      	at com.liferay.portal.kernel.service.ResourceBlockLocalServiceUtil.setIndividualScopePermissions(ResourceBlockLocalServiceUtil.java:603)
      	at com.liferay.exportimport.internal.util.ExportImportPermissionUtil.updateResourcePermissions(ExportImportPermissionUtil.java:143)
      	at com.liferay.exportimport.internal.util.ExportImportPermissionUtil.updateResourcePermissions(ExportImportPermissionUtil.java:128)
      	at com.liferay.exportimport.lar.PortletDataContextImpl.importPermissions(PortletDataContextImpl.java:1523)
      	at com.liferay.exportimport.lar.PortletDataContextImpl.importPermissions(PortletDataContextImpl.java:1439)
      	at com.liferay.exportimport.lar.PortletDataContextImpl.importClassedModel(PortletDataContextImpl.java:1396)
      	at com.liferay.exportimport.lar.PortletDataContextImpl.importClassedModel(PortletDataContextImpl.java:1352)
      	at com.liferay.calendar.internal.exportimport.data.handler.CalendarResourceStagedModelDataHandler.doImportStagedModel(CalendarResourceStagedModelDataHandler.java:240)
      	at com.liferay.calendar.internal.exportimport.data.handler.CalendarResourceStagedModelDataHandler.doImportStagedModel(CalendarResourceStagedModelDataHandler.java:54)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:364)
      	... 189 more
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 10 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP30
                7.0.X EE
                7.0.4 CE GA5
                7.1.X
                Master