Get all groups name based on project name in jira

KevinQ September 1, 2017

I have project key, is there a way I can get all groups that currently have access to this project?

1 answer

1 vote
Thanos Batagiannis _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2017

Hey Kevin,

If you want to get the groups that have browse permissions for a prohject the you can run the following script in your scirpt console

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.Permissions

def project = ComponentAccessor.projectManager.getProjectObjByKey("TAT")
def result = "Groups that have Browse Project Permission for project ${project.key} <br>"
result + ComponentAccessor.permissionManager.getAllGroups(Permissions.BROWSE, project)?.collect { it.name }?.join("<br>")

regards, Thanos

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events