@PublicApi
public interface CustomerContextService
This service allows you to setup customer context, execute some code and have the special Jira Service Management permissions apply to that called code.
Normally on the Jira platform, only licensed users can login and get permission-ed access to services. Jira Service Management, however, allows exceptions to this. In Jira Service Management EVERY named user is considered a "customer" when they are asking for help. This service allows you to enter a "customer context" to run code in the name of that user (free or otherwise).
WARNING : It is a breach of the Jira and Jira Service Management licence agreements to use this mechanism to subvert the software's terms and conditions. You must only use these methods when you are calling code services on behalf of customers, where that work is related to Jira Service Management.
Modifier and Type | Method and Description |
---|---|
boolean |
isInCustomerContext() |
<T> T |
runInCustomerContext(NoExceptionsCallable<T> callable)
Executes the code in a "customer context".
|
void |
runInCustomerContext(Runnable runnable)
Executes the code in a "customer context".
|
<T> T |
runOutOfCustomerContext(NoExceptionsCallable<T> callable)
Executes the code out of a "customer context".
|
void |
runOutOfCustomerContext(Runnable runnable)
Executes the code out of a "customer context".
|
<T> T runInCustomerContext(NoExceptionsCallable<T> callable)
This method is re-entrant and can be called multiple times within the same thread.
T
- the return typecallable
- the code to executevoid runInCustomerContext(Runnable runnable)
This method is re-entrant and can be called multiple times within the same thread.
runnable
- the code to execute<T> T runOutOfCustomerContext(NoExceptionsCallable<T> callable)
This method is re-entrant and can be called multiple times within the same thread.
T
- the return typecallable
- the code to executevoid runOutOfCustomerContext(Runnable runnable)
This method is re-entrant and can be called multiple times within the same thread.
runnable
- the code to executeboolean isInCustomerContext()
Copyright © 2023 Atlassian. All rights reserved.