How to add custom global permission on plugin installation?

Kristina Bonevska May 28, 2019

Hey there,

I am new in Jira Sever plugins Development and I am trying to find a way to add new custom global permission when my plugin is installed.

This permission should be applied to all users in this particular Jira Server instance.  The reason behind that is I want administrators to be able to restrict some users from using the plugin.

Is that possible? 

 

 

2 answers

0 votes
Ajay Pazheparambil September 20, 2021

Hi @Petter Gonçalves 

Is there anything similar for Confluence ?

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 29, 2019

Hello Kristina,

You can configure a module in JIRA that allows your add-on to define custom global Permissions. Example:

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "modules": {
    "jiraGlobalPermissions": [
      {
        "description": {
          "value": "Custom global permission for my add-on"
        },
        "anonymousAllowed": false,
        "defaultGrants": [
          "all"
        ],
        "name": {
          "value": "My Global Permission"
        },
        "key": "my-global-permission"
      }
    ]
  }
}

For more information about that module and how you can configure it, you can check the documentation below:

Global Permission - Atlassian Developers

Let us know if this information helps.

Suggest an answer

Log in or Sign up to answer