From 51ecbdc041b5da40315a31b12b5a56c33dec30fa Mon Sep 17 00:00:00 2001
From: Simon Charette <charette.s@gmail.com>
Date: Fri, 18 Jan 2013 13:48:09 -0500
Subject: [PATCH] Fixed #19632 -- Corrected the auth documentation concerning
@user_passes_test
---
docs/topics/auth/default.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt
index d1463c6..5697385 100644
a
|
b
|
checks to make sure the user has an email in the desired domain::
|
466 | 466 | from django.contrib.auth.decorators import user_passes_test |
467 | 467 | |
468 | 468 | def email_check(user): |
469 | | return '@example.com' in request.user.email |
| 469 | return '@example.com' in user.email |
470 | 470 | |
471 | 471 | @user_passes_test(email_check) |
472 | 472 | def my_view(request): |