Logo

Docs

  • HOME

Class: User

User

new User()

Create a new instance of User
Properties:
Name Type Description
title String user's title
name String user's name
email String user's email
status String user's status
language String user's language
profile String user's profile
receive_alert String is the user marked to receive alert
password String user's password
lanes Array Array containing a list of lanes
lanePools Array Array containing a list of pools loaded from lanes;
authorizations Array Array containing a list of authorizations
updated Date The updated date and time
author Object Contains the data of the user's author
extension Object Contains the user's extension
preference Object Contains the user's preference
poolLinks Array List of pool links
projects Array List of projects
delegations Array Contains a list of delegations
metadata Object Contains the user's metadata
preferences Object Contains the user's preferences
oauths Array Contains the user's external applications authorizations
accessRestrictions Array List of access restrictions
billingStatus String is the user's bill status
clientLanguage String is the user's Client Language
(Date) published - The published date
Source:
  • User/User.js, line 71
See:
  • UserList
  • Resource
Examples
Load user from list
		var userList = new UserList();
		var optUL = {};
		optUL.onSuccess =  function(){
			var user = userList.users[0];
			var optU = {};
			optU.onSuccess =  function(){
				alert('User '+user.id+' loaded');
			};
			user.load(optU);
		};
		userList.load(optUL);
	
Load logged in user data
		var user = new User();
		var optU = {};
		optU.onSuccess =  function(){
			alert('User '+user.id+' loaded');
		};
		user.load(optU);

Methods

changePassword(options)

Change a user's password.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
password String <optional>
the new password to be set
Source:
  • User/User.js, line 885

create()

Create a new User.
Parameters:
Name Type Argument Description
options.onSuccess Resource~onSuccess a callback function called in case of a success
options.onFailure Resource~onFailure <optional>
a callback function called in case of a failure
options.baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • User/User.js, line 581
See:
  • Resource#resourceSave
Example
Create a User
        var user = new User();
		user.name = 'UserName';
		user.email = 'uName@domain.com';
		user.create({
			onSuccess : function(){
			alert('User '+user.id+' created!');
			}
		});

createAuthorization(options)

Create new support authorizations for a specific user.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
email String email of the user to authorize
expires Date expiration date
Source:
  • User/User.js, line 389

deleteAuth(options)

Delete specific support authorizations of a user.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
authId String id of the authorization to be deleted
Source:
  • User/User.js, line 852

generate_xml(p_ischangepass, p_addCategories, baseUrl)

Generates a save/update xml to be posted to the server
Parameters:
Name Type Argument Description
p_ischangepass Boolean flag to add the password category to the xml
p_addCategories Array <optional>
additional categories to be added to the xml
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • User/User.js, line 717

generateUrl()

Overrides Resource's generateUrl method to return the Post url
Source:
  • User/User.js, line 635
See:
  • Resource#generateUrl

generateUrl()

Overrides Resource's generateUrl method to return the request url
Source:
  • User/User.js, line 807
See:
  • Resource#generateUrl

generateUrl()

Overrides Resource's generateUrl method to return the request url
Source:
  • User/User.js, line 119
See:
  • Resource#generateUrl

harcodedValues(paramGroup, localID) → {String}

Retrieve harcoded values for the user class.
Parameters:
Name Type Description
paramGroup String group of parameters
localID String the local identifier
Source:
  • User/User.js, line 1006
Returns:
value - the return hardcoded value
Type
String

loadAcceptanceLanes(options)

Load a list of lanes.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 273
See:
  • Resource#load
Example
Load Lanes
    function loadLanes(p_user){//user object
		p_user.loadLanes({
			onSuccess : function(){
				alert("there are " +p_user.lanes+" lanes");
			}
		});
	};

loadAuthorizations(options)

Load a list of Authorizations.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 361
See:
  • Resource#load
Example
Load Authorizations
		function loadAuth(p_user){//user object
			p_user.loadAuthorizations({
				onSuccess : function(){
					alert("there are " +p_user.authorizations.length+" authorizations");
				}
			});
		};

loadDelegations(options)

Load a list of Delegations.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 417
See:
  • Resource#load
Example
Load Delegations
    function loadDel(p_user){//user object
		p_user.loadDelegations({
			onSuccess : function(){
				alert("there are " +p_user.delegations.length+" delegations");
			}
		});
	};

loadLanes(options)

Load a list of lanes.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 233
See:
  • Resource#load
Example
Load Lanes
    function loadLanes(p_user){//user object
		p_user.loadLanes({
			onSuccess : function(){
				alert("there are " +p_user.lanes+" lanes");
			}
		});
	};

loadLogginUser(options)

Loads the user currently logged id
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • User/User.js, line 996

loadOauths(options)

Load a list of Oauths.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 495
See:
  • Resource#load
Example
Load Oauths
    function loadOauths(p_user){//user object
		p_user.loadOauths({
			onSuccess : function(){
				alert("there are " +p_user.oauths.length+" oauths");
			}
		});
	};

loadOauths2(options)

Load a list of Oauths.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 532
See:
  • Resource#load
Example
Load Oauths
    function loadOauths(p_user){//user object
		p_user.loadOauths({
			onSuccess : function(){
				alert("there are " +p_user.oauths.length+" oauths");
			}
		});
	};

loadPoolsSerialized(options)

Load pools in a serialized manner
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
filters Array <optional>
an array of filters
pagination Object <optional>
an Object with pagination variables (nb and first)
Source:
  • User/User.js, line 311
Example
Load Pools in a serialized manner
	function LoadPoolsSerialized(p_user){
		p_user.loadPoolsSerialized({
			onSuccess:function(){
				alert(JSON.stringify(p_user.pools));
				alert(JSON.stringify(p_user.lanes));
			}
		});
	}

loadPreset()

Overrides Resource's loadPreset method.
Source:
  • User/User.js, line 113
See:
  • Resource#loadPreset

loadProjects(options)

Load user peojects.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 916

loadRepresentations(options)

Load a list of Representations.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
pagination Object <optional>
an Object with pagination variables (nb and first)
filters Array <optional>
an array of filters
Source:
  • User/User.js, line 456
See:
  • Resource#load

loadSet(rObject)

Overrides Resource's loadSet method to set local variables after request.
Parameters:
Name Type Description
rObject json JSON representation of the loaded data.
Source:
  • User/User.js, line 129
See:
  • Resource#loadSet

resetPassword(options)

Reset a user's password.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • User/User.js, line 800

saveAuth(options)

Create new support authorizations for a specific user.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
email String email of the user to be authorized
expires String representation on when the authorization expires
Source:
  • User/User.js, line 822

saveDelegation(options)

Create new delegation for a specific user.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
delegatedUser User the user to be delegated
startDate Date the date in which the delegation becomes active
Source:
  • User/User.js, line 961

savePreset()

Overrides Resource's savePreset method.DEPRECATED
Source:
  • User/User.js, line 557
See:
  • Resource#savePreset

saveSet(options)

Overrides Resource's saveSet.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • User/User.js, line 199
See:
  • Resource#createSet

update(options)

Override Resource update method.
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Source:
  • User/User.js, line 659
See:
  • Resource#update
Example
Update a User
        function updateAUser(p_user){//user object
			p_user.name = p_user.name+'new';
			p_user.update({
			onSuccess : function(){
							alert('user '+p_user.id+' updated!');
						}
			});

		};

updatePreset()

Overrides Resource's updatePreset method.
Source:
  • User/User.js, line 629
See:
  • Resource#updatePreset

userDeactivate(options)

DEPRECATED Sets the user status to inactive and posts it to the server
Parameters:
Name Type Description
options object options to be used during the call
Properties
Name Type Argument Description
onSuccess Resource~onSuccess a callback function called in case of a success
onFailure Resource~onFailure <optional>
a callback function called in case of a failure
baseUrl String <optional>
base URL. If not set the current base URL will be used
Deprecated:
  • Yes
Source:
  • User/User.js, line 688

Index

Classes

  • AccessLog
  • AllLaneUserList
  • AppInstanceReport
  • Context
  • Customer
  • CustomerDomainList
  • CustomerList
  • CustomerSubscriptionList
  • CustomerTrafficList
  • CustomList
  • CustomListList
  • Domain
  • Host
  • HostList
  • HostMode
  • I18n
  • I18nDico
  • Lane
  • LaneList
  • LanePoolList
  • LogLog
  • Metadata
  • Oauth
  • OauthList
  • Pool
  • PoolList
  • Preferences
  • Process
  • ProcessList
  • Project
  • ProjectAppliQuery
  • ProjectChildList
  • ProjectLaneList
  • ProjectList
  • ProjectProcess
  • ProjectProcessList
  • ProjectProcessQuery
  • ProjectVersion
  • ProjectVersionList
  • Report
  • RequestLog
  • Resource
  • SavedQuery
  • Subscription
  • Token
  • Traffic
  • Usage
  • User
  • UserAccessList
  • UserDelegation
  • UserDelegationList
  • UserLaneList
  • UserList
  • UserRepresentationList
  • UserSupportAuth
  • UserSupportAuthList
  • WebInterface
  • WebInterfaceList

Global

  • context

© Akorbi Digital RMP. All Rights Reserved - Legal terms - Contact