Code

Ticket #19632: 0001-Fixed-19632-Corrected-the-auth-documentation-concern.patch

File 0001-Fixed-19632-Corrected-the-auth-documentation-concern.patch, 896 bytes (added by charettes, 18 months ago)
  • docs/topics/auth/default.txt

    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:: 
    466466        from django.contrib.auth.decorators import user_passes_test 
    467467 
    468468        def email_check(user): 
    469             return '@example.com' in request.user.email 
     469            return '@example.com' in user.email 
    470470 
    471471        @user_passes_test(email_check) 
    472472        def my_view(request):