Restricting access to reports

It is possible to restrict access to JIRA reports based on predefined criteria, such as making the report visible only to a certain group of people, or showing the report only in certain projects, and so on. Let us quickly have a look at how to code permissions for a JIRA report.

Getting ready

Create the report plugin, as explained in the first recipe.

How to do it...

All we need to do here is to implement the showReport method on the report. Let us assume we want to restrict the report only to JIRA Administrators. The following are the steps:

  1. Override the showReport method in the report class we created in the previous recipes.
  2. Implement the logic to return true only if the condition is satisfied. In our example, the report ...

Get JIRA Development Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.