diff options
| author | markotibold | 2011-06-11 01:48:10 +0200 |
|---|---|---|
| committer | markotibold | 2011-06-11 01:48:10 +0200 |
| commit | 8ef333a29f1981b1ca4fa060998863285f408019 (patch) | |
| tree | 18550821862e0635381e371e805dd3c4e182bd9e /djangorestframework/permissions.py | |
| parent | 63d086ea11a0d7f713086a48e1c9da38aa300c6a (diff) | |
| download | django-rest-framework-8ef333a29f1981b1ca4fa060998863285f408019.tar.bz2 | |
implemented testing of per user throttling
Diffstat (limited to 'djangorestframework/permissions.py')
| -rw-r--r-- | djangorestframework/permissions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/permissions.py b/djangorestframework/permissions.py index 1f6151f8..a9b3f08b 100644 --- a/djangorestframework/permissions.py +++ b/djangorestframework/permissions.py @@ -103,9 +103,9 @@ class PerUserThrottling(BasePermission): def check_permission(self, user): (num_requests, duration) = getattr(self.view, 'throttle', (0, 0)) - + if user.is_authenticated(): - ident = str(auth) + ident = str(user) else: ident = self.view.request.META.get('REMOTE_ADDR', None) |
