Hi,
I'm wondering how to get the current url that is shown in the browser? In Jira easy, but hwo can i do it in confluence?
I want to create a condition that only runs a script fragment when the user is in the space admin area > user rights.
Best Regards
Manuel
In my experience, the URL is not available for fragment conditions in Scriptrunner.
The only variable in the binding is DefaultWebInterfaceContext
But depending on what kind of fragment you are trying to implement, it might be available elsewhere.
For example, in a "Show Web Panel", in the Provider class/Script, you can access the URI with the following snippet:
import com.atlassian.confluence.core.ConfluenceActionSupport
def action = context.action as ConfluenceActionSupport
def uri = action.currentRequest?.requestURI as String ?: ""
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.