Grant

Grant

Grant (user).
You should never instantiate this class directly but rather use it from the data variable got using getGrant.

Constructor

new Grant(grant)

Description:
  • Constructor
Source:
Parameters:
Name Type Description
grant object Grant object

Members

apps :array

Description:
  • User home scopes
Source:
User home scopes
Type:
  • array

email :string

Description:
  • User email address
Source:
User email address
Type:
  • string

firstname :string

Description:
  • User first name
Source:
User first name
Type:
  • string

lang :string

Description:
  • User language
Source:
User language
Type:
  • string

lastname :string

Description:
  • User last name
Source:
User last name
Type:
  • string

login :string

Description:
  • User name
Source:
User name
Type:
  • string

picture :Doc

Description:
  • User picture
Source:
User picture
Type:

responsibilities :array

Description:
  • User responsibilities
Source:
User responsibilities
Type:
  • array

sysparams :object

Description:
  • System parameters
Source:
System parameters
Type:
  • object

texts :object

Description:
  • Translated texts
Source:
Translated texts
Type:
  • object

userid :string

Description:
  • User ID
Source:
User ID
Type:
  • string

Methods

T(code) → {string}

Description:
  • Get text value
Source:
Parameters:
Name Type Description
code string Text code
Returns:
Text value
Type
string

getEmail() → {string}

Description:
  • Get email address
Source:
Returns:
Email address
Type
string

getFirstName() → {string}

Description:
  • Alias to getFirstname
Source:
Returns:
First name
Type
string

getFirstname() → {string}

Description:
  • Get first name
Source:
Returns:
First name
Type
string

getLang() → {string}

Description:
  • Get user language
Source:
Returns:
User language
Type
string

getLastName() → {string}

Description:
  • Alias to getLastname
Source:
Returns:
Last name
Type
string

getLastname() → {string}

Description:
  • Get last name
Source:
Returns:
Last name
Type
string

getLogin() → {string}

Description:
  • Alias to getUsername
Source:
Returns:
Login
Type
string

getPictureURL() → {Doc}

Description:
  • Get picture data URL
Source:
Returns:
Picture data URL
Type
Doc

getSysParam(name) → {string}

Description:
  • Alias to getSystemParameter
Source:
Parameters:
Name Type Description
name string System parameter name
Returns:
System parameter value
Type
string

getSystemParameter(name) → {string}

Description:
  • Get system parameter value
Source:
Parameters:
Name Type Description
name string System parameter name
Returns:
System parameter value
Type
string

getUserId() → {string}

Description:
  • Get user ID
Source:
Returns:
User ID
Type
string

getUsername() → {string}

Description:
  • Get username
Source:
Returns:
Username
Type
string

hasResponsibility(group) → {boolean}

Description:
  • Has responsibility?
Source:
Parameters:
Name Type Description
group string Group name
Returns:
True if user has a responsibility on the specified group
Type
boolean

hasScope(home) → {boolean}

Description:
  • Has home scope?
Source:
Parameters:
Name Type Description
home string Home scope name
Returns:
True if user has the specified home scope
Type
boolean