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

Handle UnsupportedOperationException for User implementation within the Freemarker model/wrapper

XMLWordPrintable

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

      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.

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoD