Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3037

Handle UnsupportedOperationException for User implementation within the Freemarker model/wrapper

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.3
    • None
    • core
    • None

    Description

      When Freemarker templates attempt to output properties out of info.magnolia.cms.security.User instances which throw UnsupportedOperationException}}s (typically {{info.magnolia.cms.security.ExternalUser), this results in ugly exceptions thrown all over the place. Since templates should anyway be aware of this and provide fallback behaviour, our Freemarker wrapper for User could handle those exceptions, giving templates the chance to handle absent properties. They should be able to do user.myProperty!'default value', for example.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                gjoseph Magnolia International
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD