You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-guide/permissions.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -173,11 +173,12 @@ This permission is suitable if you want to your API to allow read permissions to
173
173
174
174
This permission class ties into Django's standard `django.contrib.auth`[model permissions][contribauth]. This permission must only be applied to views that have a `.queryset` property or `get_queryset()` method. Authorization will only be granted if the user *is authenticated* and has the *relevant model permissions* assigned. The appropriate model is determined by checking `get_queryset().model` or `queryset.model`.
175
175
176
+
*`GET` requests require the user to have the `view` or `change` permission on the model
176
177
*`POST` requests require the user to have the `add` permission on the model.
177
178
*`PUT` and `PATCH` requests require the user to have the `change` permission on the model.
178
179
*`DELETE` requests require the user to have the `delete` permission on the model.
179
180
180
-
The default behavior can also be overridden to support custom model permissions. For example, you might want to include a `view` model permission for `GET` requests.
181
+
The default behaviour can also be overridden to support custom model permissions.
181
182
182
183
To use custom model permissions, override `DjangoModelPermissions` and set the `.perms_map` property. Refer to the source code for details.
0 commit comments