Commit 8ef333a2 by markotibold

implemented testing of per user throttling

parent 63d086ea
...@@ -103,9 +103,9 @@ class PerUserThrottling(BasePermission): ...@@ -103,9 +103,9 @@ class PerUserThrottling(BasePermission):
def check_permission(self, user): def check_permission(self, user):
(num_requests, duration) = getattr(self.view, 'throttle', (0, 0)) (num_requests, duration) = getattr(self.view, 'throttle', (0, 0))
if user.is_authenticated(): if user.is_authenticated():
ident = str(auth) ident = str(user)
else: else:
ident = self.view.request.META.get('REMOTE_ADDR', None) ident = self.view.request.META.get('REMOTE_ADDR', None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment