|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface WhitelistService
Service to control whitelist rules currently used for allowing which http requests gadgets are allowed to make. This can be used in future to whitelist any http requests! Only system administrators should be allowed to modify the whitelist implemenation
Nested Class Summary | |
---|---|
static class |
WhitelistService.WhitelistResult
|
static class |
WhitelistService.WhitelistUpdateValidationResult
|
Method Summary | |
---|---|
WhitelistService.WhitelistResult |
getRules(JiraServiceContext context)
Returns a list of rules that are currently allowed in the whitelist. |
boolean |
isAllowed(URI uri)
Checks if requests to the provided URI are allowed according to the current whitelist configuration |
boolean |
isDisabled()
Returns true if the whitelist is currently disabled (meaning all requests are allowed). |
WhitelistService.WhitelistResult |
updateRules(WhitelistService.WhitelistUpdateValidationResult result)
Takes the validation result from validateUpdateRules(com.atlassian.jira.bc.JiraServiceContext,
java.util.List, boolean) and persists the new rules. |
WhitelistService.WhitelistUpdateValidationResult |
validateUpdateRules(JiraServiceContext context,
List<String> rules,
boolean disabled)
Validates that the current user is allowed to update the whitelist by checking if they are a system administrator. |
Method Detail |
---|
WhitelistService.WhitelistResult getRules(JiraServiceContext context)
context
- The service context with the current user & error collection
WhitelistService.WhitelistUpdateValidationResult validateUpdateRules(JiraServiceContext context, List<String> rules, boolean disabled)
context
- The service context with the current user & error collectionrules
- List of rule stringsdisabled
- true if the whitelist should be turned off
WhitelistService.WhitelistResult updateRules(WhitelistService.WhitelistUpdateValidationResult result)
validateUpdateRules(com.atlassian.jira.bc.JiraServiceContext,
java.util.List, boolean)
and persists the new rules.
result
- a validation result obtained by calling validateUpdateRules(com.atlassian.jira.bc.JiraServiceContext,
java.util.List, boolean)
boolean isDisabled()
boolean isAllowed(URI uri)
uri
- The uri a http request is made to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |