djblets.webapi.resources.user¶
Built-in resource representing the User model.
- class UserResource[source]¶
Bases:
WebAPIResource
A default resource for representing a Django User model.
- fields = {'email': {'description': "The user's e-mail address", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'first_name': {'description': "The user's first name.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'fullname': {'description': "The user's full name (first and last).", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'id': {'description': 'The numeric ID of the user.', 'type': <class 'djblets.webapi.fields.IntFieldType'>}, 'last_name': {'description': "The user's last name.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'url': {'description': "The URL to the user's page on the site. This is deprecated and will be removed in a future version.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'username': {'description': "The user's username.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}}[source]¶
- has_modify_permissions(request, user, *args, **kwargs)[source]¶
Return whether or not the user can modify this object.
- __annotations__ = {}¶