Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.X, Master
-
7.0.x
-
Committed
-
1
-
4
-
Default
Description
Description
Upgrading from 6.0 sp2 to Liferay 7, we look at all the companyIds in the IG_Image table and add an IMAGE-GALLERY-IMAGE DLFileEntryType for each of those companyIds. But we don't add the ResourcePermissions for them, which causes errors when trying to visit the Documents and Media portlet, ultimately making it impossible to add a new document.
Steps to Reproduce
1. Start up Liferay 6.0 sp2 and log in as the admin user.
2. Navigate to Control Panel > Liferay Site > Image Gallery.
3. Add an image to the image gallery.
4. Shut down Liferay.
5. Upgrade to DXP.
6. Navigate to Control Panel > Liferay Site > Documents and Media.
Expected Result: The add button is there in the bottom-right corner, so that a new document, folder, or shortcut can be added.
Actual Result: The add button is not there, and the following stack trace appears in the console:
com.liferay.portal.kernel.exception.NoSuchResourcePermissionException: {companyId=10136, name=com.liferay.document.library.kernel.model.DLFileEntryType, primKey=10502, scope=4} at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:710) 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.liferay.portal.service.impl.ResourceLocalServiceImpl.hasUserPermissions(ResourceLocalServiceImpl.java:450) 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.liferay.portal.kernel.service.ResourceLocalServiceUtil.hasUserPermissions(ResourceLocalServiceUtil.java:323) at com.liferay.portal.security.permission.AdvancedPermissionChecker.doCheckPermission(AdvancedPermissionChecker.java:598) at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasUserPermissionImpl(AdvancedPermissionChecker.java:1596) at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasPermissionImpl(AdvancedPermissionChecker.java:1565)