Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-88

Annotations are not found when using cglib proxies

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2.4, 2.0.1
    • 1.2.2
    • None
    • OS X 10.7.3, JRE 1.6.0_31-b04-415-11M3635, Tomcat 6.0.32

      If you have something like this:

      ContentSection.java
      @Controller
      @Paragraph("ContentSection")
      @ParagraphDescription("Displays substructure of a section and enables creating and deleting pages and folders")
      public class ContentSection
      {
          @PreAuthorize("hasPermission('nodeUUID', 'uuid', T(info.magnolia.cms.security.Permission).WRITE)")
          @RequestMapping("/contentSection")
          public
              ModelAndView
              handleRequest(Content page, Content paragraph) throws RepositoryException
          {
              ...
          }
      }
      

      and Spring Security is activated, the Blossom-Paragraph is not registered and can't be found. The reason is, that the Spring Security creates a CGLIB proxy and the Paragraph annotation is not inherited. The problem is in info.magnolia.module.blossom.paragraph.ParagraphExporter.postProcessHandler(). I guess I'll have the same problem when I use the Template annotation and Spring security.

      Is there any workaround to handle this issue?

        Acceptance criteria

              tmattsson Tobias Mattsson
              angel Angel Gerdzhikov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD