From cb3fce1c0778573084cd7f2c0ad57f48fa66900a Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Fri, 19 Jul 2024 13:43:11 -0400 Subject: [PATCH] fix(auth): remote user backend type sig compat with Django 5 --- bento_lib/auth/django_remote_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bento_lib/auth/django_remote_user.py b/bento_lib/auth/django_remote_user.py index 821d5fb..abf10a3 100644 --- a/bento_lib/auth/django_remote_user.py +++ b/bento_lib/auth/django_remote_user.py @@ -25,7 +25,7 @@ class BentoRemoteUserMiddleware(RemoteUserMiddleware): class BentoRemoteUserBackend(RemoteUserBackend): # noinspection PyMethodMayBeStatic - def configure_user(self, request, user): + def configure_user(self, request, user, created: bool = True): is_owner = request.META.get(DJANGO_USER_ROLE_HEADER, ROLE_USER) == ROLE_OWNER user.is_staff = is_owner user.is_superuser = is_owner