Jira scriptrunner- How to filter user who don't have permission to all proejct?

Is there a way I can filter out users who do have access to Jira, but do not have any access to all the project?

1 answer

1 accepted

You mean like, in a JQL? 

I don't think you've expressed yourself clearly enough. Can you give me an specific example?

You can compile a list of this through groovy scripting for sure. You can get all the users with the user manager and then use this:

In this particular example it would be CREATION permission, but you can change that to whatever suits you.

changeItems = ComponentAccessor.permissionManager.hasPermission(Permissions.CREATE_ISSUE, issue.project, UserUtils.getUser(currentUser))

 Do say if I can help you further.

Cheers!

DYelamos

I mean I want a list of user who don't have access to all projects in Jira. User have access to Jira, but got never assign any project.

You can use what I gave you avobe. That should work.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

86 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you