implemented testing of per user throttling

This commit is contained in:
markotibold 2011-06-11 01:48:10 +02:00
parent 63d086ea11
commit 8ef333a29f

View File

@ -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)