aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorTom Christie2013-02-11 13:02:20 +0000
committerTom Christie2013-02-12 08:58:28 +0000
commitf5a0275547ad264c8a9b9aa2a45cc461723a4f11 (patch)
treea73b8835792eca9053ad5c4bc2c91ae7b1ae040b /docs/api-guide
parent09b01887f234be55c14943028330f569823b2369 (diff)
downloaddjango-rest-framework-f5a0275547ad264c8a9b9aa2a45cc461723a4f11.tar.bz2
Tidy up internal view permission checking logic.
Also document correctly - these methods are now public and will fall under the deprecation policy from now on.
Diffstat (limited to 'docs/api-guide')
-rw-r--r--docs/api-guide/permissions.md2
-rw-r--r--docs/api-guide/views.md6
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md
index 5cb3ec3c..4845ac88 100644
--- a/docs/api-guide/permissions.md
+++ b/docs/api-guide/permissions.md
@@ -150,7 +150,7 @@ As well as global permissions, that are run against all incoming requests, you c
# Instance must have an attribute named `owner`.
return obj.owner == request.user
-Note that the generic views will check the appropriate object level permissions, but if you're writing your own custom views, you'll need to make sure you check the object level permission checks yourself, by calling `self.has_object_permission(request, obj)` from the view.
+Note that the generic views will check the appropriate object level permissions, but if you're writing your own custom views, you'll need to make sure you check the object level permission checks yourself. You can do so by calling `self.check_object_permissions(request, obj)` from the view once you have the object instance. This call will raise an appropriate `APIException` if any object-level permission checks fail, and will otherwise simply return.
[cite]: https://developer.apple.com/library/mac/#documentation/security/Conceptual/AuthenticationAndAuthorizationGuide/Authorization/Authorization.html
[authentication]: authentication.md
diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md
index 574020f9..8b26b3e3 100644
--- a/docs/api-guide/views.md
+++ b/docs/api-guide/views.md
@@ -76,11 +76,11 @@ The following methods are used by REST framework to instantiate the various plug
The following methods are called before dispatching to the handler method.
-### .check_permissions(...)
+### .check_permissions(self, request)
-### .check_throttles(...)
+### .check_throttles(self, request)
-### .perform_content_negotiation(...)
+### .perform_content_negotiation(self, request, force=False)
## Dispatch methods