aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/permissions.md
diff options
context:
space:
mode:
authorTom Christie2013-08-21 19:57:30 +0100
committerTom Christie2013-08-21 19:57:30 +0100
commitcf6ae397db1353370fef05df99a8d321806a6f58 (patch)
treee60f5fd5ed106e2590d858da79db4518363ace4e /docs/api-guide/permissions.md
parentd900847d98e40921cd9bde251e002453d1d922be (diff)
downloaddjango-rest-framework-cf6ae397db1353370fef05df99a8d321806a6f58.tar.bz2
Docs tweaking around `check_object_permissions`
Diffstat (limited to 'docs/api-guide/permissions.md')
-rw-r--r--docs/api-guide/permissions.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md
index 6b80a98c..12aa4c18 100644
--- a/docs/api-guide/permissions.md
+++ b/docs/api-guide/permissions.md
@@ -25,7 +25,8 @@ Object level permissions are run by REST framework's generic views when `.get_ob
As with view level permissions, an `exceptions.PermissionDenied` exception will be raised if the user is not allowed to act on the given object.
If you're writing your own views and want to enforce object level permissions,
-you'll need to explicitly call the `.check_object_permissions(request, obj)` method on the view at the point at which you've retrieved the object.
+or if you override the `get_object` method on a generic view, then you'll need to explicitly call the `.check_object_permissions(request, obj)` method on the view at the point at which you've retrieved the object.
+
This will either raise a `PermissionDenied` or `NotAuthenticated` exception, or simply return if the view has the appropriate permissions.
For example: