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

WebsiteImpl should use ListTypeLocalServiceUtil instead of ListTypeServiceUtil

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.0.4 CE GA5
    • Fix Version/s: None
    • Component/s: User Management
    • Labels:

      Description

      Since com.liferay.portal.model.impl.WebsiteImpl usesĀ ListTypeServiceUtil every call to
      website.getType().getName() goes through PermissionChecker and results in

      Caused by: java.lang.SecurityException: Access denied to com.liferay.portal.kernel.service.ListTypeService#getListType
      	at com.liferay.portal.security.service.access.policy.internal.SAPAccessControlPolicy.checkAccess(SAPAccessControlPolicy.java:108)
      	at com.liferay.portal.security.service.access.policy.internal.SAPAccessControlPolicy.onServiceRemoteAccess(SAPAccessControlPolicy.java:79)
      	at com.liferay.portal.security.access.control.AccessControlAdvisorImpl.accept(AccessControlAdvisorImpl.java:59)
      	at com.liferay.portal.security.access.control.AccessControlAdvice.before(AccessControlAdvice.java:47)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:44)
      	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.sun.proxy.$Proxy143.getListType(Unknown Source)
      	at com.liferay.portal.kernel.service.ListTypeServiceUtil.getListType(ListTypeServiceUtil.java:46)
      	at com.liferay.portal.model.impl.WebsiteImpl.getType(WebsiteImpl.java:28)
      

      when an application calling WebsiteImpl.getType() is accessed by guest user. WebsiteImpl should follow the pattern used elsewhere and use Local service instead.

      Hopefully this change would also make it possible to not need to throw PortalException in WebsiteImpl.getType()

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              milen.dyankov Milen Dyankov
              Participants of an Issue:
              Recent user:
              Raven Song
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                1 year, 33 weeks, 6 days ago

                Packages

                Version Package