Allowing users to control permissions

When you have a mixed group of users, such as internal employees and outside consultants, working on the same JIRA project, there will be issues with sensitive information that should only be viewed by internal employees. In these cases, you would want to mark those issues as internal only so that other people cannot see them.

In this recipe, we will look at how to set up permissions to control access at the issue level with issue security schemes.

How to do it...

The steps for setting up issue-level permissions are as follows:

  1. Since JIRA does not come with any default issue security schemes, the first step is to create a new one from scratch:
    1. Navigate to Administration | Issues | Issue security schemes.
    2. Click on the Add Issue Security Scheme button.
    3. Enter the new scheme's name, and click on Add.
  2. The second step is to set up the security levels that you can choose from such as Internal Users Only:
    1. Click on the Security Levels link for our new issue security scheme.
    2. Enter the name for each security level, and click on the Add Security Levels button.

    You can add a new security level from the form at the bottom.

    Tip

    You can also click on the Default link to make a security level default. This preselects the default security level while creating new issues in projects, using the issue security scheme.

    The following screenshot shows the three existing security levels:

    How to do it...
  3. After we have set up the security levels, the third step is to grant users access to each of the security levels that you have defined:
    1. Click on the Add link for the security level you want to set up the user access for.
    2. Select the permission option, and click on the Add button.

    The following screenshot displays the different options you have while granting security levels:

    How to do it...
  4. Now that we have all the security levels set up, the last step is to apply the issue security scheme to our project:
    1. Go to the project you want to apply the issue security scheme to, and click on the Administration tab.
    2. Select the Issue Security option on the left-hand side, and click on the Select a scheme option from the Actions menu.
    3. Select the new issue security scheme, and click on Next.
    4. If the project is not empty, JIRA asks you to select a default security level for all the issues. You can select the None option so that all issues remain as they are, or you can select a security level that is applied to all issues
    5. Click on the Associate button, and the issue security scheme is now applied to the project, as seen in the next screenshot:
      How to do it...

How it works...

The issue security scheme allows you to control who can access individual issues, based on the security levels set. Issues with security level are viewable only by those who meet the criteria. Note that subtasks inherit security levels from their parent issues.

Once we have applied the issue security scheme to a project, users with the Set Issue Security permission are able to select a security level while creating and editing issues, as shown in the following screenshot:

Tip

If you do not see the Security Levels field, make sure the field is added to the screen, and you have the Set Issue Security permission. You can use the Permission Helper feature covered in the previous recipe to verify.

It is also worth mentioning that you can only select security levels that you belong to. For example, if there are two security levels, A and B, security level A is granted to the jira-administrators group, and security level B is granted to the jira-users group. Now, as a member of the jira-users group, you will only be able to select security level B. This is depicted in the following screenshot:

How it works...

Note

Users with permission to set issue security levels can select any of the available security levels, even if they do not meet the level's requirement.

This means users can potentially lock themselves out.

A user who meets the criteria for the selected security level is able to view the issue normally. However, if a user who does not meet the criteria tries to view the issue, he or she gets a Permission violation error, as shown in the following screenshot:

How it works...
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset