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!

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Kristján Geir Mathiesen
Community Champion
December 2, 2020

@Jagadish did you see the answer from Susanne?

0 votes
Kristján Geir Mathiesen
Community Champion
November 26, 2020

Hi @Jagadish 

Take a look at the answer from @Denis Blanchette gave to this question:

Solved: How to get list of worklogs through JIRA REST API (atlassian.com)

HTH,
KGM

Jagadish
November 30, 2020

Hi @Kristján Geir Mathiesen 

I looked at those answers but none of them have a clear solution on how to get the status of the tempo timesheet .

Susanne Götz _Tempo_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 1, 2020

Hi @Kristján Geir Mathiesen ,

Please take a look at https://www.tempo.io/server-api-documentation/timesheets#tag/Timesheet-Approval for information about the available REST API's for the approvals in Tempo. 

It is also possible to get the approval status of worklogs with the Tempo Servlet (https://tempo-io.atlassian.net/wiki/spaces/THC/pages/649200068/Tempo+Servlet+Manual+-+Tempo+Server)
By adding the "addApprovalStatus=true" parameter to the URL, information about the approval status is added to the response. 

Best regards,
Susanne Götz
Tempo team 

TAGS
AUG Leaders

Atlassian Community Events