Ticket #12463: user_passes_test_decorator.diff

File user_passes_test_decorator.diff, 635 bytes (added by Alexandre Garnier, 10 years ago)

patch for that if accepted

  • django/contrib/auth/decorators.py

     
    7474        return _CheckLogin(view_func, self.test_func, self.login_url, self.redirect_field_name)
    7575   
    7676    def __call__(self, request, *args, **kwargs):
    77         if self.test_func(request.user):
     77        if self.test_func(request.user, *args, **kwargs):
    7878            return self.view_func(request, *args, **kwargs)
    7979        path = urlquote(request.get_full_path())
    8080        tup = self.login_url, self.redirect_field_name, path
Back to Top