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

Add permission checking in Journal Article index

    Details

      Description

      This is a partial backport of LPS-33429 from master to ee-6.1.x, applying the logic of permission checking in JournalIndexer.

      Reproduction Steps
      1 - Start Liferay Portal 6.1 ga3 or 6.1.x and connect it to a Solr 1.4.1 server via the solr-web plugin
      2 - Add some web contents, all containing the word "test" in the title
      3 - Add the search portlet to a page and search for the word "test"
      Checkpoint: It finds all web contents and the test user as well
      4 - Navigate to Control Panel -> Web Content
      5 - Shut down the Solr server. (This way, we'll delete the item from the database, but not from the index)
      6 - For any of the web contents that is not the first, click Actions -> Delete. As a side note, some exceptions will be printed to the log because the solr server is unreachable, which is normal
      7 - Start the solr server back up
      8 - Go to the page where the search portlet is, and search for the word "Test"
      Result: The search portlet will find all the web contents that are in the list before the one that got deleted in step 6, but it won't show the others

      Also, the following exception is shown in the log:

      00:30:51,864 ERROR [http-bio-8080-exec-5][IncludeTag:253] Current URL /web/guest/home?p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=1&p_p_col_count=2&_3_struts_action=%2Fsearch%2Fsearch&_3_redire
      ct=%2Fhome&_3_keywords=test&_3_groupId=0 generates exception: com.liferay.portlet.asset.NoSuchEntryException: No AssetEntry exists with the key {classNameId=10108, classPK=10436}
      00:30:51,869 ERROR [http-bio-8080-exec-5][IncludeTag:157] com.liferay.portlet.asset.NoSuchEntryException: No AssetEntry exists with the key {classNameId=10108, classPK=10436}
              at com.liferay.portlet.asset.service.persistence.AssetEntryPersistenceImpl.findByC_C(AssetEntryPersistenceImpl.java:2933)
              at com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl.getEntry(AssetEntryLocalServiceImpl.java:228)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:117)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:52)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:113)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:218)
              at com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil.getEntry(AssetEntryLocalServiceUtil.java:640)
              at org.apache.jsp.html.portlet.search.main_005fsearch_005fresult_005fform_jsp._jspService(main_005fsearch_005fresult_005fform_jsp.java:635)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:99)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
              at com.liferay.portal.kernel.dao.search.JSPSearchEntry.print(JSPSearchEntry.java:64)
              at org.apache.jsp.html.taglib.ui.search_005fiterator.page_jsp._jspService(page_jsp.java:1070)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:99)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
      

        Attachments

        1. affects.png
          affects.png
          29 kB
        2. Fixed.png
          Fixed.png
          40 kB

          Issue Links

            Activity

              People

              • Assignee:
                mark.jin Mark Jin (Inactive)
                Reporter:
                gergely.mathe Gergely Mathe
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  6.1.X EE