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

Documents and Media throws an exception when a user doesn't have permissions to view a folder

    Details

      Description

      When a user doesn't have a permission to view a folder hits the URL for that folder. The user is presented with an unfriendly error message "Documents and Media is temporarily unavailable."

      In the console a stack trace is also printed as a result.

      21:58:12,783 ERROR [RuntimePageImpl-3][render_portlet_jsp:132] null
      com.liferay.portal.NoSuchRepositoryEntryException: No RepositoryEntry exists with the primary key 10618
      	at com.liferay.portal.service.persistence.impl.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2681)
      	at com.liferay.portal.service.persistence.impl.RepositoryEntryPersistenceImpl.findByPrimaryKey(RepositoryEntryPersistenceImpl.java:2699)
      	at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.createRepositoryImpl(RepositoryLocalServiceImpl.java:419)
      	at com.liferay.portal.service.impl.RepositoryLocalServiceImpl.getRepositoryImpl(RepositoryLocalServiceImpl.java:368)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      

      To reproduce:

      1. Drop the "Documents and Media" portlet on to a page.
      2. Add a new folder without guest permissions.
      3. Open the folder.
      4. Copy the URL.
      5. Logout.
      6. Access the copied URL.
      7. Receive error and uncaught stack trace.

      Expected:

      The remote service should have thrown a PrincipalException so that the user is informed that they do not have permissions to view.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yunlin.sun Yunlin "Steven" Sun
              Reporter:
              ryan.park Ryan Park
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 15 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1