Whitelist
Whitelist component
Static Method Summary
Static Private Methods | ||
private static |
getWhitelistForEmail(email: *): whitelist Get the whitelist from localStorage |
|
private static |
getWhitelistKeyForEmail(email: *): string Get the key to lookup in localStorage for the whitelist. |
|
private static |
setWhitelistForEmail(email: string, whitelist: whitelist): boolean Set the whitelist in localStorage |
|
private static |
Test URLs. |
Constructor Summary
Private Constructor | ||
private |
constructor(email: *) Initialize the instance. |
Member Summary
Private Members | ||
private |
email: * Whitelist's Email |
Method Summary
Public Methods | ||
public |
Add URL to whitelist. |
|
public |
Check if URL is allowed |
|
public |
Remove URL from whitelist |
Private Methods | ||
private |
Get the whitelist in localStorage. |
|
private |
Set the whitelist in localStorage. |
Static Private Methods
private static getWhitelistForEmail(email: *): whitelist source
Get the whitelist from localStorage
Params:
Name | Type | Attribute | Description |
* |
private static getWhitelistKeyForEmail(email: *): string source
Get the key to lookup in localStorage for the whitelist.
Params:
Name | Type | Attribute | Description |
* |
private static setWhitelistForEmail(email: string, whitelist: whitelist): boolean source
Set the whitelist in localStorage
Private Constructors
private constructor(email: *) source
Initialize the instance.
Params:
Name | Type | Attribute | Description |
* |
Private Members
Public Methods
public addURL(title: string, url: string): boolean source
Add URL to whitelist.
Throw:
URL is already in whitelist. |
public isAllowed(url: string): boolean source
Check if URL is allowed
Params:
Name | Type | Attribute | Description |
url | string | The URL to check if whitelist allows. |
public removeURL(url: string): whitelist source
Remove URL from whitelist
Params:
Name | Type | Attribute | Description |
url | string | The URL to remove from the whitelist |