mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #26035 -- Prevented user-tools from appearing on admin logout page.
This commit is contained in:
committed by
Tim Graham
parent
62e83c71d2
commit
7cc2efc2d6
@@ -372,7 +372,13 @@ class AdminSite(object):
|
||||
"""
|
||||
from django.contrib.auth.views import logout
|
||||
defaults = {
|
||||
'extra_context': dict(self.each_context(request), **(extra_context or {})),
|
||||
'extra_context': dict(
|
||||
self.each_context(request),
|
||||
# Since the user isn't logged out at this point, the value of
|
||||
# has_permission must be overridden.
|
||||
has_permission=False,
|
||||
**(extra_context or {})
|
||||
),
|
||||
}
|
||||
if self.logout_template is not None:
|
||||
defaults['template_name'] = self.logout_template
|
||||
|
||||
Reference in New Issue
Block a user