public class DefaultWhitelistManager extends Object implements WhitelistManager
Constructor and Description |
---|
DefaultWhitelistManager() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getRules()
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).
|
List<String> |
updateRules(List<String> newRules,
boolean disabled)
Used to update the whitelist configuration.
|
public List<String> getRules()
WhitelistManager
getRules
in interface WhitelistManager
public boolean isDisabled()
WhitelistManager
isDisabled
in interface WhitelistManager
public List<String> updateRules(List<String> newRules, boolean disabled)
WhitelistManager
The method then returns the peristed rules
updateRules
in interface WhitelistManager
newRules
- List of rules to persistdisabled
- True if the whitelist should be switched offpublic boolean isAllowed(URI uri)
WhitelistManager
isAllowed
in interface WhitelistManager
uri
- The uri a http request is made toCopyright © 2002-2019 Atlassian. All Rights Reserved.