aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/permissions.py
diff options
context:
space:
mode:
authormarkotibold2011-05-18 22:13:48 +0200
committermarkotibold2011-05-18 22:13:48 +0200
commit92c015e0495b7cf39b0d0387fe6d376812a9ebef (patch)
tree81549ea10c2b2e3c550bea163e464d91f5925bb5 /djangorestframework/permissions.py
parent49d4e50342cd3a6e2dce9f61d379cb54a0c1c6b5 (diff)
downloaddjango-rest-framework-92c015e0495b7cf39b0d0387fe6d376812a9ebef.tar.bz2
Most of the actual work so far has been markup really.
Diffstat (limited to 'djangorestframework/permissions.py')
-rw-r--r--djangorestframework/permissions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/djangorestframework/permissions.py b/djangorestframework/permissions.py
index 1b151558..10ba7eac 100644
--- a/djangorestframework/permissions.py
+++ b/djangorestframework/permissions.py
@@ -36,7 +36,7 @@ class BasePermission(object):
def check_permission(self, auth):
"""
- Should simply return, or raise an ErrorResponse.
+ Should simply return, or raise an :class:`response.ErrorResponse`.
"""
pass
@@ -59,7 +59,7 @@ class IsAuthenticated(BasePermission):
if not user.is_authenticated():
raise _403_FORBIDDEN_RESPONSE
-class IsAdminUser():
+class IsAdminUser(BasePermission):
"""
Allows access only to admin users.
"""
@@ -85,7 +85,7 @@ class PerUserThrottling(BasePermission):
"""
Rate throttling of requests on a per-user basis.
- The rate is set by a 'throttle' attribute on the ``View`` class.
+ The rate (requests / seconds) is set by a :attr:`throttle` attribute on the ``View`` class.
The attribute is a two tuple of the form (number of requests, duration in seconds).
The user id will be used as a unique identifier if the user is authenticated.