mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Change: sync OIDC groups on first login too (#9387)
This commit is contained in:
parent
db5e54c6e5
commit
6babc61ba2
@ -10,6 +10,8 @@ from django.contrib.auth.models import User
|
|||||||
from django.forms import ValidationError
|
from django.forms import ValidationError
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
from paperless.signals import handle_social_account_updated
|
||||||
|
|
||||||
logger = logging.getLogger("paperless.auth")
|
logger = logging.getLogger("paperless.auth")
|
||||||
|
|
||||||
|
|
||||||
@ -114,4 +116,5 @@ class CustomSocialAccountAdapter(DefaultSocialAccountAdapter):
|
|||||||
)
|
)
|
||||||
user.groups.add(*groups)
|
user.groups.add(*groups)
|
||||||
user.save()
|
user.save()
|
||||||
|
handle_social_account_updated(None, request, sociallogin)
|
||||||
return user
|
return user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user