Skip to content

Instantly share code, notes, and snippets.

@adrianlee
Created June 29, 2012 15:46
Show Gist options
  • Save adrianlee/3018734 to your computer and use it in GitHub Desktop.
Save adrianlee/3018734 to your computer and use it in GitHub Desktop.
Avaliable whitelist functions:
isAccessAllowed()checks if <access uri="*" /> or !!getAccessByUrl() is true
getFeaturesForUrl() gets an array of features that are whitelisted for the URL.
Scenario:
Assume we want to check if http://rim.com is whitelisted for blackberry.io feature. We don't know if there is global access.
assume getFeaturesForUrl() returns [ "blackberry.app" ]
isAccessAllowed() may return true but we don't know if it is because there's global access or because !!getFeaturesForURL() is true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment