jira scriptrunner user belongs to group

I have a user A, I need to figure out whether A belongs to GroupA or not.

1 answer

1 accepted

If you use scriptrunner then in the script console you can execute something like 

import com.atlassian.jira.component.ComponentAccessor

def groupA = ComponentAccessor.groupManager.getGroup("GroupA")
ComponentAccessor.groupManager.getUserNamesInGroup(groupA).contains("usernameA")

Suggest an answer

Log in or Join to answer

Stay in touch

Be the first to know what's trending on Atlassian Community