Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-11374

Birt > Error while viewing report without read access to the model

    XMLWordPrintable

    Details

      Description

      When viewing a report instance, we access also the related report model. Only administrators can access the models, so we end up by returning null in the BirtReportInstance class:

      public ReportModel getModel() throws ClientException {
              String modelUUID = (String) doc.getPropertyValue(PREFIX + ":modelRef");
              IdRef modelRef = new IdRef(modelUUID);
       ---->  if (!getSession().exists(modelRef)) {
                  // !!!
                  return null;
              }
              DocumentModel model = getSession().getDocument(modelRef);
      
              return model.getAdapter(ReportModel.class);
          }
      

      The reports model should be retrieved in an unrestricted session, and then detached.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: