Package Products :: Package Zuul :: Package routers :: Module users :: Class UsersRouter
[hide private]
[frames] | no frames]

Class UsersRouter

source code

ZenUtils.Ext.DirectRouter --+
                            |
                           UsersRouter

A JSON/ExtDirect interface to operations on Users

Instance Methods [hide private]
 
__init__(self, context, request) source code
 
_getFacade(self) source code
 
setAdminPassword(self, newPassword) source code
 
deleteUsers(self, userIds)
Removes all the users with the given user ids.
source code
DirectResponse
getUsers(self, keys=None, start=0, limit=50, page=0, sort='name', dir='ASC', name=None)
Retrieves a list of users.
source code
DirectResponse
addUser(self, id, password, email, roles=('ZenUser',))
Adds a new user to the system.
source code
 
markWizardAsFinished(self) source code
Method Details [hide private]

setAdminPassword(self, newPassword)

source code 
Decorators:
  • @require('Manage DMD')

deleteUsers(self, userIds)

source code 

Removes all the users with the given user ids. Will continue upon removing users if an invalid id is specified.

Parameters:
  • userIds (List of Strings) - (optional) list of ids to remove.

getUsers(self, keys=None, start=0, limit=50, page=0, sort='name', dir='ASC', name=None)

source code 

Retrieves a list of users. This method supports pagination.

Parameters:
  • start (integer) - (optional) Offset to return the results from; used in pagination (default: 0)
  • name (string) - (optional) filter to be applied to users returned (default: None)
  • limit (integer) - (optional) Number of items to return; used in pagination (default: 50)
  • sort (string) - (optional) Key on which to sort the return results (default: 'name')
  • dir (string) - (optional) Sort order; can be either 'ASC' or 'DESC' (default: 'ASC')
Returns: DirectResponse
Properties:
  • data: (list) Dictionaries of user properties
  • totalCount: (integer) Number of devices returned

addUser(self, id, password, email, roles=('ZenUser',))

source code 

Adds a new user to the system.

Parameters:
  • id (string) - The unique identifier of the user, same as their login
  • password (string) - the password of the new user
  • roles (list of strings) - (optional) roles to be applied to the new user
Returns: DirectResponse
Properties:
  • data: properties of the new users
Decorators:
  • @require('Manage DMD')

markWizardAsFinished(self)

source code 
Decorators:
  • @require('Manage DMD')