Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Run CQL query as different user in user macro

Dar Kronenblum
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 Leaders.
June 24, 2018

Hi ,

I would like to make some calculation in the user macro based on restricted pages and I wonder if I can run CQL query as different user in a user macro?

I'm using this code to run the query:

def cqlSearchService = ScriptRunnerImpl.getOsgiService(CQLSearchService)
def pageRequest = new SimplePageRequest(0, 1000)
def searchResult = cqlSearchService.searchContent(mycql, SearchContext.builder().build(), pageRequest, Expansion.combine("space")) as PageResponse<Content>
return searchResult

 

thanks,

Dar

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events