Uploaded image for project: 'Magnolia Mail Module'
  1. Magnolia Mail Module
  2. MGNLMAIL-145

Send Email for external User (SSO-3.0.0) fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 5.5.15
    • 5.5.14
    • None
    • None

      Steps to reproduce

      1.  Use an instance which has SSO-3.0.0 installed
      2.  Configure SSO module to map email attribute from the openID
      3.  Check that when Mail modules tries to send an email it fails throwing an UnsoportedOperationException

      Expected results

      The email is properly retrieved from the external user and the email is sent

      Actual results

      UnsoportedOperationException is thrown

      Workaround

      N/A

      Development notes

      When the MailVerifyPresenter class (method sendSimpleMail) tries to send the email, it fails because it does't check it the user is MgnlUser or an ExternalUser:

      MailVerifyPresenter.java
      String userEmailAddress = PropertyUtil.getString(SessionUtil.getNodeByIdentifier(RepositoryConstants.USERS, MgnlContext.getUser().getIdentifier()), PROPERTY_EMAIL);
      

      Discovery

      Regarding this specific problem, in fact the user email can be retrieved using MgnlContext.getUser().getProperty("email") which is a generic way for both MgnlUser and ExternalUser

      Notes: Apply the same fix for both methods MailVerifyPresenter#sendSimpleMail and MailVerifyPresenter#sendTemplateMail (source code)

        Acceptance criteria

              nguyen.phung Nguyen Phung Chi
              ccantalapiedra Carlos Cantalapiedra
              AdminX
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1.5d
                    1.5d