Examples
dashboard.getFeature('UserProfile')
appFactory.getFeature('UserProfile')
Methods
getContentLocale() → {string}
Returns:
user content locale. Defaults to 'en'
- Type
- string
getProductLocale() → {string}
Returns:
user content locale. Defaults to 'en'
- Type
- string
getUserAccount() → {Object}
Returns:
The user's account information including {defaultName, userName}
- Type
- Object
getValidDomainList() → {String}
Returns:
- A list of valid domains, separated by coma, null or empty string means all domains are supported
- Type
- String
Example
'localhost,www.ibm.com,www.domainport.com:80, .onelevel.com ,*.alllevels.com,.mixed.com:80'
hasCapability(capabilityName) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
capabilityName |
string | Name of the capabilities:
|
Returns:
Returns 'true' if the capability is known and enabled; false otherwise.
- Type
- boolean
Example
if (userProfile.hasCapability('canAuthorDashboard') === true) {
//do something
} else {
// do something else
}