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

Permission error when importing System Roles

    Details

      Description

      Steps to reproduce:

      1. Navigate to Users > Role
      2. Export roles (including System Roles) and download LAR file
      3. Import LAR file

      Result: Error when importing. Note that this error doesn't happen when System roles aren't exported.

      15:36:21,723 WARN  [liferay/background_task-2][PortletImportBackgroundTaskExecutor:94] Unable to import portlet: com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 20156 must have DEFINE_PERMISSIONS permission for com.liferay.portal.kernel.model.Role 20125
      15:36:21,735 ERROR [liferay/background_task-2][BackgroundTaskMessageListener:164] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 20156 must have DEFINE_PERMISSIONS permission for com.liferay.portal.kernel.model.Role 20125
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:408)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:353)
              at com.liferay.roles.admin.internal.exportimport.data.handler.RolesAdminPortletDataHandler.doImportData(RolesAdminPortletDataHandler.java:141)
              at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:372)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:300)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:783)
              at com.liferay.exportimport.controller.PortletImportController.doImportPortletInfo(PortletImportController.java:576)
              at com.liferay.exportimport.controller.PortletImportController.importFile(PortletImportController.java:228)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:373)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              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:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy147.importPortletInfo(Unknown Source)
              at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:230)
              at com.liferay.exportimport.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:124)
              at com.liferay.exportimport.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:110)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:93)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
              at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
              at com.liferay.exportimport.background.task.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:85)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54)
              at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
              at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56)
              at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:124)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 20156 must have DEFINE_PERMISSIONS permission for com.liferay.portal.kernel.model.Role 20125
              at com.liferay.portal.service.impl.PermissionServiceImpl.checkPermission(PermissionServiceImpl.java:240)
              at com.liferay.portal.service.impl.PermissionServiceImpl.checkPermission(PermissionServiceImpl.java:87)
              at sun.reflect.GeneratedMethodAccessor1392.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:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy172.checkPermission(Unknown Source)
              at com.liferay.portal.service.impl.ResourcePermissionServiceImpl.addResourcePermission(ResourcePermissionServiceImpl.java:81)
              at sun.reflect.GeneratedMethodAccessor1391.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:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy173.addResourcePermission(Unknown Source)
              at com.liferay.roles.admin.internal.exportimport.data.handler.RoleStagedModelDataHandler.importResourcePermissions(RoleStagedModelDataHandler.java:346)
              at com.liferay.roles.admin.internal.exportimport.data.handler.RoleStagedModelDataHandler.doImportStagedModel(RoleStagedModelDataHandler.java:230)
              at com.liferay.roles.admin.internal.exportimport.data.handler.RoleStagedModelDataHandler.doImportStagedModel(RoleStagedModelDataHandler.java:60)
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:364)
              ... 39 more
      

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6.26
      Portal Master Git Hash: 8825727877bf64a43b6583f37888439a7b0e00ce
      Portal ee-7.0.x Git Hash: e31da2bc95957adf8ccf95a3c9319d3a32dd6b11
      Portal DXP GA1 + FP1
      Portal 7.0 CE GA1

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.lee Brian Lee
                Reporter:
                brian.lee Brian Lee
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 3 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP5
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  7.1.X
                  Master