Confluence Cloud - Exported Charts to PDF/Word

Description

The Problem

  • On Confluence Server, when PDF generation is started, a request is made to the server asking for the image to use
  • This is fine on Server because we generate the image when the chart finishes rendering and send it to the server, so it’s ready to go
  • But on Cloud, the image that is used must already be an attachment on the page, which represents a problem
  • Currently, each user who views a chart does so as their own user, which means the data displayed is based on their permissions on the connected Jira instance
  • Therefore, Custom Charts would either need to save multiple attachments (one for each user) or overwrite the attachments, which both result in
    • A mess (less important)
    • A security issue (very important)
  • The security issue is that there are no granular permissions regarding attachments, it’s either “View” or “No view” on all attachments on the page
  • This is unacceptable which is why we haven’t implemented this feature yet on Confluence Cloud

The Solution

  • The two problems presented (a mess of attachments and a security issue) can both be solved by a common workaround -[ User Impersonation|https://ossapps.atlassian.net/wiki/spaces/CCFC/pages/579698765/User+Impersonation]
  • When a Custom Chart has User Impersonation enabled, everyone who views the page sees exactly the same data loaded on the chart
  • This removes both problems, as now this Custom Chart can save a single image of itself as an attachment to the page, which can then be used for PDF and Word exports
  • The dependency for this solution is, therefore, User Impersonation: https://ossapps.atlassian.net/browse/TRACC-7