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

NoSuchResourcePermissionException when switching publications after deleting a web content folder

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Publications
    • Labels:
      None
    • Fix Priority:
      3

      Description

      Steps to Reproduce:

      1. Start portal and create a web content folder with a web content within
      2. Create a publication P1
      3. Create a publication P2
      4. Delete the WC folder in P1 and publish
      5. Switch to P2

      Expected Result:
      Can see web content folder

      Actual Result:
      Web content admin is empty and there is an error in the console log

      ERROR [http-nio-8080-exec-9][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_id=com_liferay_journal_web_portlet_JournalPortlet&p_p_lifecycle=0&p_p_state=maximized&p_v_l_s_g_id=20123&p_p_auth=aeZx2sCc generates exception: java.lang.IllegalArgumentException: Someone may be trying to circumvent the permission checker: {companyId=20099, name=com.liferay.journal.model.JournalFolder, primKey=42097, scope=4}
      com.liferay.portal.kernel.exception.NoSuchResourcePermissionException: {companyId=20099, name=com.liferay.journal.model.JournalFolder, primKey=42097, scope=4}
      	at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:1062) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) ~[portal-kernel.jar:?]
      	at com.liferay.portal.kernel.service.ResourcePermissionLocalServiceWrapper.hasResourcePermission(ResourcePermissionLocalServiceWrapper.java:789) ~[portal-kernel.jar:?]
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) ~[portal-kernel.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
      	at com.liferay.portal.service.impl.ResourceLocalServiceImpl.hasUserPermissions(ResourceLocalServiceImpl.java:406) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.service.ResourceLocalServiceUtil.hasUserPermissions(ResourceLocalServiceUtil.java:345) ~[portal-kernel.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker.doCheckPermission(AdvancedPermissionChecker.java:433) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasUserPermissionImpl(AdvancedPermissionChecker.java:1322) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasPermissionImpl(AdvancedPermissionChecker.java:1291) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker.hasPermission(AdvancedPermissionChecker.java:240) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.StagingPermissionChecker.hasPermission(StagingPermissionChecker.java:137) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.StagingPermissionChecker.hasPermission(StagingPermissionChecker.java:153) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.security.permission.wrapper.PermissionCheckerWrapper.hasPermission(PermissionCheckerWrapper.java:123) ~[portal-kernel.jar:?]
      	at com.liferay.on.demand.admin.internal.security.permission.wrapper.OnDemandAdminPermissionCheckerWrapper.lambda$hasPermission$3(OnDemandAdminPermissionCheckerWrapper.java:78) ~[?:?]

      Reproduced on:
      Tomcat 9.0.43 + MySQL 5.7 Portal Master GIT ID: c406508139ee68d8938a2076c9afa7e56bb47b38

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              brooke.dalton Brooke Dalton
              Participants of an Issue:
              Recent user:
              Brooke Dalton
              Engineering Assignee:
              Ricardo Moura
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                11 weeks, 5 days ago

                  Packages

                  Version Package