aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/permissions.md
diff options
context:
space:
mode:
authorTom Christie2014-07-07 09:51:23 +0100
committerTom Christie2014-07-07 09:51:23 +0100
commitb51901812596aa478cc8cb1046e42049214bc9ff (patch)
tree44e19ec5ff42b37eb84ab29be943984726c21d14 /docs/api-guide/permissions.md
parenta5e628bf8b4cf26227d4ee0cbef45049aa0632d5 (diff)
downloaddjango-rest-framework-b51901812596aa478cc8cb1046e42049214bc9ff.tar.bz2
Docs on object level permissions and filters. Closes #1683
Diffstat (limited to 'docs/api-guide/permissions.md')
-rw-r--r--docs/api-guide/permissions.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md
index 50f669a2..c44b22de 100644
--- a/docs/api-guide/permissions.md
+++ b/docs/api-guide/permissions.md
@@ -36,6 +36,12 @@ For example:
self.check_object_permissions(self.request, obj)
return obj
+#### Limitations of object level permissions
+
+For performance reasons the generic views will not automatically apply object level permissions to each instance in a queryset when returning a list of objects.
+
+Often when you're using object level permissions you'll also want to [filter the queryset][filtering] appropriately, to ensure that users only have visibility onto instances that they are permitted to view.
+
## Setting the permission policy
The default permission policy may be set globally, using the `DEFAULT_PERMISSION_CLASSES` setting. For example.
@@ -237,6 +243,7 @@ The [REST Condition][rest-condition] package is another extension for building c
[cite]: https://developer.apple.com/library/mac/#documentation/security/Conceptual/AuthenticationAndAuthorizationGuide/Authorization/Authorization.html
[authentication]: authentication.md
[throttling]: throttling.md
+[filtering]: filtering.md
[contribauth]: https://docs.djangoproject.com/en/1.0/topics/auth/#permissions
[objectpermissions]: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#handling-object-permissions
[guardian]: https://github.com/lukaszb/django-guardian