aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/permissions.md
diff options
context:
space:
mode:
authorTom Christie2014-11-25 16:06:45 +0000
committerTom Christie2014-11-25 16:06:45 +0000
commit306916aca126dfbe61fe9d1f0052c5cce921b669 (patch)
treee2f4036fa043ec501d5c85ae3e7e8fb91408f051 /docs/api-guide/permissions.md
parent64d8e3dcb6846610e1908e067962b0c8457a86f8 (diff)
parent84b34d43307704ad8240b871a48dcd6e73848cd1 (diff)
downloaddjango-rest-framework-306916aca126dfbe61fe9d1f0052c5cce921b669.tar.bz2
Merge branch 'd0ugal-mkdocs'
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