util Class
Utility methods. Mostly private
getAccountInfo
()
Returns info about currently logged in user from bootstrap resource
getAccountInfoInBootstrap
-
bootstrapData
Returns current user info from bootstrapData
Parameters
-
bootstrapData
Object- data was got from bootstrap resource
getCurrentProfile
()
Promise
Gets current user's profile
Returns
Resolves with account setting object
getFeatureFlags
()
Returns the feature flags valid for the currently logged in user.
getIn
-
path
Create getter function for accessing nested objects
Parameters
-
path
StringTarget path to nested object
isLoggedIn
()
Promise
Find out whether a user is logged in
Returns
resolves with true if user logged in, false otherwise
isLoggedInProject
-
projectId
Find out whether a specified project is available to a currently logged user
Parameters
-
projectId
StringA project identifier
Returns
Resolves with true if user logged in and project available, resolves with false if user logged in and project not available, rejects if user not logged in
login
-
username
-
password
This function provides an authentication entry point to the GD API. It is needed to authenticate by calling this function prior any other API calls. After providing valid credentials every subsequent API call in a current session will be authenticated.
Parameters
-
username
String -
password
String
loginSso
-
encryptedClaims
-
ssoProvider
-
targetUrl
This function provides an authentication entry point to the GD API via SSO https://help.gooddata.com/display/developer/GoodData+PGP+Single+Sign-On
Parameters
-
encryptedClaims
StringPGP message
-
ssoProvider
String -
targetUrl
String
logout
()
Logs out current user
updateProfileSettings
-
profileId
-
profileSetting
Updates user's profile settings
Parameters
-
profileId
String- User profile identifier
-
profileSetting
Object