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

PrincipalException thrown when adding a thread via mailing list on Message Boards

Details

    Description

      Steps to Reproduce

      1. Add a Message Boards widget to the page
      2. Add a new Category and configure its mailing list to use a valid email address
      3. Create a new user with a valid email address
      4. Add the new user to the default site
      5. From the new user's email send a message to the email address of the mailing list

      Expected Results
      The email sent results in a new thread being added to the Message Board category

      Actual Results
      No thread is added to the Message Board category and the following exception is in the logs:

      2020-03-20 21:01:13.456 ERROR [liferay/message_boards_mailing_list-3][ParallelDestination:59] Unable to process message {destinationName=liferay/message_boards_mailing_list, response=null, responseDestinationName=null, responseId=null, payload=c[email protected]63dd1bdd, values={GROUP_NAME=liferay/message_boards_mailing_list/37441, companyId=0, groupId=0, DESTINATION_NAME=liferay/message_boards_mailing_list, EXCEPTIONS_MAX_SIZE=0, [email protected], STORAGE_TYPE=PERSISTED, JOB_NAME=liferay/message_boards_mailing_list/37441}}
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 37445 must have ADD_MESSAGE permission for com.liferay.message.boards.model.MBCategory 37440
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 37445 must have ADD_MESSAGE permission for com.liferay.message.boards.model.MBCategory 37440
      	at com.liferay.portal.kernel.internal.security.permission.resource.DefaultModelResourcePermission.check(DefaultModelResourcePermission.java:54)
      	at com.liferay.portal.kernel.security.permission.resource.ModelResourcePermissionUtil.check(ModelResourcePermissionUtil.java:39)
      	at com.liferay.message.boards.service.impl.MBMessageServiceImpl.addMessage(MBMessageServiceImpl.java:120)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy722.addMessage(Unknown Source)
      	at com.liferay.message.boards.internal.messaging.MailingListMessageListener.processMessage(MailingListMessageListener.java:251)
      	at com.liferay.message.boards.internal.messaging.MailingListMessageListener.processMessages(MailingListMessageListener.java:284)
      	at com.liferay.message.boards.internal.messaging.MailingListMessageListener.doReceive(MailingListMessageListener.java:93)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	... 5 more
      

      Attachments

        Activity

          People

            jeremy.chen Jeremy Chen
            jonathan.mccann Jonathan McCann
            Kiyoshi Lee Kiyoshi Lee
            Jonathan McCann Jonathan McCann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 43 weeks, 1 day ago

              Packages

                Version Package
                7.3.1 CE GA2
                7.3.2 CE GA3
                7.3.4 CE GA5
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master