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?

Tejas Naik Oct 04, 2016

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
Alexander Richter Oct 04, 2016

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 [Adaptavist] 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.

Tejas Naik Oct 04, 2016

It worked...Thank you very much Alexander

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

197 views 21 10
Join discussion

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