tcms.xmlrpc.api.user module

tcms.xmlrpc.api.user.update(user_id, values, **kwargs)[source]
XML-RPC User.update(user_id, values)

Updates the fields of the selected user. Can be used to update password as well!

Parameters:
  • user_id (int) – PK of user to update
  • values (dict) – Field values for django.contrib.auth.models.User
Returns:

Serialized django.contrib.auth.models.User object

Raises:

PermissionDenied if missing the auth.change_user permission when updating another user or when passwords don’t match.

Note

If user_id is None will update the user issuing the RPC request.

Warning

Changing the password for another user via RPC is not allowed!

tcms.xmlrpc.api.user.filter(query=None, **kwargs)[source]
XML-RPC User.filter(query)

Search and return the resulting list of users.

Parameters:query (dict) – Field lookups for django.contrib.auth.models.User
Returns:Serialized django.contrib.auth.models.User object without the password field!
Return type:dict

Note

If query is None will return the user issuing the RPC request.

tcms.xmlrpc.api.user.join_group(username, groupname)[source]
XML-RPC User.join_group(username, groupname)

Add user to a group specified by name.

Parameters:
  • username (str) – Username to modify
  • groupname (str) – Name of group to join, must exist!
Returns:

None

Raises:

PermissionDenied if missing auth.change_user permission