mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #6991 -- Removed some redundant user.is_authenticated() calls in various places. Thanks, alexkoshelev, Liang Feng and Ivan Sagalaev
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8a109a7bc8
commit
933b9e8de7
5 changed files with 5 additions and 5 deletions
|
@ -1031,7 +1031,7 @@ checks to make sure the user is logged in and has the permission
|
|||
``polls.can_vote``::
|
||||
|
||||
def my_view(request):
|
||||
if not (request.user.is_authenticated() and request.user.has_perm('polls.can_vote')):
|
||||
if not request.user.has_perm('polls.can_vote'):
|
||||
return HttpResponse("You can't vote in this poll.")
|
||||
# ...
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue