Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.3
    • Component/s: media
    • Labels:
      None

      Description

      Take advantage of @XmlNamedObjectGraph to support (un)marshalling subgraphs of JAXB entities for different security roles. (see [1])

      For example:

      @Path("projects")
      @RolesAllowed({"manager", "developer", "client"})
      public class ProjectsResource {
      
          @GET
          @Path("{id}")
          public Project getProject(@PathParam("id") final String id) {
              ...
          }
      }
      
      @XmlRootElement
      public class Project {
      
          private Long id;
         
          private String description;
      
          @RolesAllowed({"manager", "developer"})
          private List<Task> tasks;
      
          @RolesAllowed({"manager", "client"})
          private List<Reports> reports;
      
          @RolesAllowed("manager")
          private List<User> developers;
      
          @XmlTransient
          // or @DenyAll
          private Date created;
      
          ...
      }
      

      Marshall, for:

      • client - id, description, reports
      • developer - id, description, tasks
      • manager - id, description, tasks, reports, developers

      [1] http://blog.bdoughan.com/2013/03/moxys-object-graphs-inputoutput-partial.html

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Michal Gajdos
            Reporter:
            Michal Gajdos
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 days Original Estimate - 2 days
              2d
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 3 days, 18 hours
              3d 18h