From 6babc61ba2d7bcb0dd2c581dbf367e3949b3feef Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 13 Mar 2025 07:19:34 -0700 Subject: [PATCH] Change: sync OIDC groups on first login too (#9387) --- src/paperless/adapter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/paperless/adapter.py b/src/paperless/adapter.py index e29acb2ff..91c800cdc 100644 --- a/src/paperless/adapter.py +++ b/src/paperless/adapter.py @@ -10,6 +10,8 @@ from django.contrib.auth.models import User from django.forms import ValidationError from django.urls import reverse +from paperless.signals import handle_social_account_updated + logger = logging.getLogger("paperless.auth") @@ -114,4 +116,5 @@ class CustomSocialAccountAdapter(DefaultSocialAccountAdapter): ) user.groups.add(*groups) user.save() + handle_social_account_updated(None, request, sociallogin) return user