tcms.rpc.api.user module¶
-
tcms.rpc.api.user.
add_attachment
(filename, b64content, **kwargs)[source]¶ -
RPC User.add_attachment(filename, b64content)
Attach a file under the currently logged-in user!
This method is meant to be used by SimpleMDE combined with post_save processing for various models like TestPlan and TestCase. While files uploaded by this method will be attached and available (if you know their URL), there is no UI to see all of the files uploaded by a certain user or manage them!
Parameters: Returns: Information about the attachment
Return type:
-
-
tcms.rpc.api.user.
filter
(query=None, **kwargs)[source]¶ -
RPC User.filter(query)
Search and return the resulting list of users.
Parameters: - query (dict) – Field lookups for
django.contrib.auth.models.User
- **kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
Returns: Serialized
django.contrib.auth.models.User
object without the password field!Return type: - query (dict) – Field lookups for
Note
If query is
None
will return the user issuing the RPC request.-
-
tcms.rpc.api.user.
update
(user_id, values, **kwargs)[source]¶ -
RPC User.update(user_id, values)
Updates the fields of the selected user. Can be used to update password as well!
Parameters: Returns: Serialized
django.contrib.auth.models.User
objectReturn type: 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!
-