How to show a button only to users with admin role?

Jira User June 30, 2022

Hello there,

I want only users with admin role to see a button in Jira.
I want to find script runner code where I can provide this restriction.

 

Thanks everyone

1 answer

0 votes
Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2022

Hi @Jira User you shouldn't need to do anything fancy with scriptrunner to do this.  All you need to do is set a condition on the transition you wish to only expose to a limited group or role.
Ex: Condition = Only users in group Admin can perform this transition
     Condition = Only users in Project Role Admin can perform this transition

Jira User June 30, 2022

Thanks for answer @Craig Nodwell 

 

but It's not done with transitions, because I want only admins to see a button in Jira navigator.

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2022

Perhaps you should describe your requirements a bit better.
What do you mean by Jira navigator?
What is the purpose of this button?
Are you talking about a custom UI element?

Jira User June 30, 2022

Actually, I want to hide the "Insight" menu in Jira navigator for non-admin users.

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2022

Do you have scriptrunner available to you?  It's a Jira plugin.
It has this specific feature relevant to your request.
HideUIElement 

Jira User June 30, 2022

I have scriptrunner, but I don't know how to do that?

Craig Nodwell
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2022

Read the docs
Try the examples
Trust in yourself
You got the job you have for a reason

Suggest an answer

Log in or Sign up to answer