Ticket #6991: 6991.diff
File 6991.diff, 2.0 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/views/decorators.py
52 52 member, displaying the login page if necessary. 53 53 """ 54 54 def _checklogin(request, *args, **kwargs): 55 if request.user.is_ authenticated() and request.user.is_staff:55 if request.user.is_staff: 56 56 # The user is valid. Continue to the admin page. 57 57 if 'post_data' in request.POST: 58 58 # User must have re-authenticated through a different window -
django/contrib/admin/templates/admin/base.html
21 21 <div id="branding"> 22 22 {% block branding %}{% endblock %} 23 23 </div> 24 {% if user.is_ authenticated and user.is_staff %}24 {% if user.is_staff %} 25 25 <div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="{{ root_path }}doc/">{% trans 'Documentation' %}</a> / <a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a> / <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>{% endblock %}</div> 26 26 {% endif %} 27 27 {% block nav-global %}{% endblock %} -
docs/authentication.txt
712 712 permission ``polls.can_vote``:: 713 713 714 714 def my_view(request): 715 if not (request.user.is_authenticated() and request.user.has_perm('polls.can_vote')):715 if not request.user.has_perm('polls.can_vote'): 716 716 return HttpResponse("You can't vote in this poll.") 717 717 # ...