Dear all,
we use Jira Server - v8.20.9.
I was tasked with a problem that seams straight forward but sadly is not.
The goal is to take from a Jira Issue the assignee and check against a link provided in a field called Environment if the user has read access or not by using Automation.
So far I have encountered the following challenges:
- the field Environment can contain more than one link - I decided to use ";" as a delimiter so that I can read all the values - {{issue.environment.split(';')}}
- How to convert normal Confluence URL to Rest-API URL?
- For example users will provide a link like this: ".../confluence/display/Space/PageName" and for the web request I need a Url that looks like this: "/confluence/rest/api/content/12620667"
- I found a way to do it, but actually there is another way to access Confluence pages: viewpage.action?pageId=30302710 which is bad because I am already in If-Else chain so I can not build a logic by using another IF

- Is there a way to read space permissions?
- biggest problem here is that even if you check for a page access, the user might have permission on a higher level page or from the space from a group... Any ideas?
- for example if I write "../restriction/byOperation/update" I get 3 user names as a result, but if I write "../restriction/byOperation/read" I get Zero/Null user names, e.g. the system shows me only explicit rights given ...
- the call can be done only for one Confluence page - {{issue.environment.split(';').get(0).trim()}}/restriction/byOperation
- Is there a way to make a loop of web requests - for example I take 3 pages from environment, so I need to loop for 0,1 and 2 element of split?
- the result is a list of Jira User IDs: aabbcc, ffzzmm, kkssll ....
- How can I store this list? I think the local variable is not working for server, so only option is to store it in a field, then re-fetch and then read one-by-one and match to {{assignee.userName}} or?
All help is welcomed 
Cheers,
Nikola