Change: sync OIDC groups on first login too ()

This commit is contained in:
shamoon 2025-03-13 07:19:34 -07:00 committed by GitHub
parent db5e54c6e5
commit 6babc61ba2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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