diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 0483c16..f6427a2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.5.5 +current_version = 1.5.6 parse = (?P\d+)\.(?P\d+)\.(?P\d+) serialize = {major}.{minor}.{patch} commit = False diff --git a/CHANGES b/CHANGES index 7fe9cc6..267b125 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +1.5.6 +----- +* pass request when basic_auth authenticate + + 1.5.5 ----- * minor refactoring of get_urls() diff --git a/src/admin_extra_buttons/__init__.py b/src/admin_extra_buttons/__init__.py index ad8cdbb..2a30edd 100644 --- a/src/admin_extra_buttons/__init__.py +++ b/src/admin_extra_buttons/__init__.py @@ -1,3 +1,3 @@ NAME = 'django-admin-extra-buttons' -VERSION = __version__ = '1.5.5' +VERSION = __version__ = '1.5.6' __author__ = 'sax' diff --git a/src/admin_extra_buttons/utils.py b/src/admin_extra_buttons/utils.py index 10fdfc0..3f13eda 100644 --- a/src/admin_extra_buttons/utils.py +++ b/src/admin_extra_buttons/utils.py @@ -16,7 +16,7 @@ def handle_basic_auth(request): if authmeth.lower() == "basic": auth = codecs.decode(auth.encode("utf8").strip(), "base64").decode() username, password = auth.split(":", 1) - user = authenticate(username=username, password=password) + user = authenticate(request=request, username=username, password=password) if user: # pragma: no branch login(request, user) return user diff --git a/tox.ini b/tox.ini index 75e7d24..1a44202 100644 --- a/tox.ini +++ b/tox.ini @@ -21,9 +21,11 @@ markers = functional: mark a test as functional [testenv] -passenv = PYTHONDONTWRITEBYTECODE DISPLAY + setenv = PYTHONDONTWRITEBYTECODE=true + DISPLAY=:0.0 + extras = test deps= d22: django==2.2.*