It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I restrict currentUser in a specific group?

On the close transition button I wanted add validation if the currentuser is in 'QA100' group
prevent user to do the transtion.

else proceed....

How to do that

1 answer

1 accepted

3 votes
Answer accepted

if you have the scriptrunner AddOn, you can use a scripted validator

maybe like this:

import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(currentUser, 'QA100') == false

this should return 'true' if the currentUser is not in the group 'QA100' and the validation will be passed.


Another Option would be to use a condition instead of validator.

Nic Brough Community Leader Oct 04, 2016

Indeed, a validator is the wrong place for this - you'll give the user an ugly and frustrating error when they try do something.  A condition would hide the transition from them so they'd simply not be able to do it.

It worked...Thank you very much Alexander

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Off-topic

Run into these Solution Partners at Atlassian Open

Hey there Community! Atlassian Open is kicking off in less than a month and we can't wait to touch down in Vienna, Sydney and Boston. This is an opportunity to create the future of teamwork with ...

96 views 0 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you