mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Refs #26601 -- Removed obsolete workarounds for MIDDLEWARE_CLASSES setting.
This commit is contained in:
committed by
Mariusz Felisiak
parent
d4e767911f
commit
0315c18fe1
@@ -18,10 +18,8 @@ class XViewMiddleware(MiddlewareMixin):
|
||||
"""
|
||||
assert hasattr(request, 'user'), (
|
||||
"The XView middleware requires authentication middleware to be "
|
||||
"installed. Edit your MIDDLEWARE%s setting to insert "
|
||||
"'django.contrib.auth.middleware.AuthenticationMiddleware'." % (
|
||||
"_CLASSES" if settings.MIDDLEWARE is None else ""
|
||||
)
|
||||
"installed. Edit your MIDDLEWARE setting to insert "
|
||||
"'django.contrib.auth.middleware.AuthenticationMiddleware'."
|
||||
)
|
||||
if request.method == 'HEAD' and (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS or
|
||||
(request.user.is_active and request.user.is_staff)):
|
||||
|
||||
Reference in New Issue
Block a user