Class: user

user

new user()

The user class for the Jira Connector

Properties:
Name Type Description
connector IConnector

the jira connector instance

model Model

the model definition

Source:

Methods

find(options, callbackopt) → {Promise.<Array>}

Returns a list of users that match the search string and/or property. This resource cannot be accessed anonymously.

Parameters:
Name Type Attributes Description
options Object

The request options passed onto the Jira API.

Properties
Name Type Attributes Default Description
token string <optional>

The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

username string

A query string used to search username, name or e-mail address

startAt number <optional>
0

the index of the first user to return (0-based)

maxResults number <optional>
50

the maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will betruncated.

includeActive boolean <optional>
true

If true, then active users are included in the results (default true)

includeInactive boolean <optional>
false

If true, then inactive users are included in the results (default false)

callback <optional>

if supplied, called with Array of matching records

Source:
Returns:

Array of matching records

Type
Promise.<Array>

findById(options, callbackopt) → {Promise.<Object>}

Returns a user. This resource cannot be accessed anonymously. The resource accepts the expand param that is used to include, hidden by default, parts of response. This can be used to include: groups - all groups, including nested groups, to which user belongs applicationRoles - application roles defines to which application user has access

Parameters:
Name Type Attributes Description
options Object

The request options passed onto the Jira API.

Properties
Name Type Attributes Description
token string <optional>

The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

id string <optional>

The key or username of the user to find

callback <optional>

if supplied, called with Array of matching records

Source:
Returns:

the selected Project

Type
Promise.<Object>

login(options, callbackopt) → {Promise.<Array>}

Creates a new session for a user in JIRA. Once a session has been successfully created it can be used to access any of JIRA's remote APIs and also the web UI

Parameters:
Name Type Attributes Description
options Object

The request options passed onto the Jira API.

Properties
Name Type Description
username string

The username to login with

password string

The password to login with

callback <optional>

if supplied, called with Array of matching records

Source:
Returns:

Array of matching records

Type
Promise.<Array>

logout(options, callbackopt) → {Promise.<Array>}

Logs the current user out of JIRA, destroying the existing session, if any.

Parameters:
Name Type Attributes Description
options Object

The request options passed onto the Jira API.

Properties
Name Type Attributes Description
token string <optional>

The token to use for authentication. This token is supplied on a sucessful login. If not supplied, the default token (if set) is used

username string

The username to logout

callback <optional>

if supplied, called with Array of matching records

Source:
Returns:

Array of matching records

Type
Promise.<Array>