Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict a ScriptRunner fragment to a specific user?

Kai Lamberson
October 26, 2020

Hello,

I'm currently working on implementing a solution for a Jira environment, and need to restrict visibility to certain UI elements to only the global administrator.  We have additional admins that we do not want accessing that specific configuration screen.  How can I get the currentUser and basically say if the currentUser equals 'specific user', show the option, otherwise hide it?

Thanks!

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Ryan Rules [Adaptavist]
Contributor
November 26, 2020

Hi Dylan!

Currently Enhanced Search only allows searching for Jira issues, using advanced queries and functions not found in native Jira Cloud search.

I think your use-case however is quite interesting, and I'd be curious to see if this is a problem other users across Jira have also.

Could you raise this suggestion onto our public backlog? It will also give others a chance to upvote on it if this is something they would also like to see implemented too. You can find this here: https://scriptrunner-for-jira-cloud.nolt.io/

One suggestion for your specific use-case however of viewing users who have never created an issue would be possible through a ScriptRunner script, if you needed on demand access to this particular scripts output, or needed to share this automation with end-users then this could be achieved through Scripted Fields too: https://scriptrunner-docs.connect.adaptavist.com/jiracloud/scripted-fields.html

I hope this information helps!

Many thanks,

Ryan

Product Manager, ScriptRunner for Jira Cloud

TAGS
AUG Leaders

Atlassian Community Events