Adding conditions for web fragments

As we saw in the previous recipes, adding a web fragment is pretty easy. However, the job doesn't always end there. In many cases, we would want to limit the web item based on a set of conditions.

For example, an Edit link on an issue should only appear for people with edit permission on an issue. The Administration link should appear only if the user is a JIRA administrator. In this recipe, let us look at how we can implement conditions for displaying web fragments.

How to do it...

It is possible to add one or more conditions to a web section or web item. In the latter case, the conditions element is used, which is a collection of condition/conditions elements and a type attribute. The type attribute is either ...

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.