aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/permissions.md
diff options
context:
space:
mode:
authorTom Christie2014-11-25 16:27:00 +0000
committerTom Christie2014-11-25 16:27:00 +0000
commitf13c0ebe69f92ecad7e84257b3baf2ccafe69b3e (patch)
tree5de4f2bcbd973513197c809b301f05f21b9db325 /docs/api-guide/permissions.md
parent8c91e7b742067b6d4e4ed6d476bfe2cf5839ac8b (diff)
parentb733f85ff1e3f70e9f5dee6f52bebe861bc0f411 (diff)
downloaddjango-rest-framework-f13c0ebe69f92ecad7e84257b3baf2ccafe69b3e.tar.bz2
Merge master
Diffstat (limited to 'docs/api-guide/permissions.md')
-rw-r--r--docs/api-guide/permissions.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md
index 446e362e..f068f0f7 100644
--- a/docs/api-guide/permissions.md
+++ b/docs/api-guide/permissions.md
@@ -1,4 +1,4 @@
-<a class="github" href="permissions.py"></a>
+source: permissions.py
# Permissions
@@ -12,7 +12,7 @@ Permission checks are always run at the very start of the view, before any other
## How permissions are determined
-Permissions in REST framework are always defined as a list of permission classes.
+Permissions in REST framework are always defined as a list of permission classes.
Before running the main body of the view each permission in the list is checked.
If any permission check fails an `exceptions.PermissionDenied` exception will be raised, and the main body of the view will not run.
@@ -220,9 +220,9 @@ As well as global permissions, that are run against all incoming requests, you c
def has_object_permission(self, request, view, obj):
# Read permissions are allowed to any request,
# so we'll always allow GET, HEAD or OPTIONS requests.
- if request.method in permissions.SAFE_METHODS:
+ if request.method in permissions.SAFE_METHODS:
return True
-
+
# Instance must have an attribute named `owner`.
return obj.owner == request.user