diff --git a/mozilla_django_oidc_db/migrations/0012_alter_openidconnectconfig_sync_groups.py b/mozilla_django_oidc_db/migrations/0012_alter_openidconnectconfig_sync_groups.py new file mode 100644 index 0000000..31077a9 --- /dev/null +++ b/mozilla_django_oidc_db/migrations/0012_alter_openidconnectconfig_sync_groups.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.18 on 2023-12-21 14:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ( + "mozilla_django_oidc_db", + "0011_alter_openidconnectconfig_userinfo_claims_source", + ), + ] + + operations = [ + migrations.AlterField( + model_name="openidconnectconfig", + name="sync_groups", + field=models.BooleanField( + default=True, + help_text="If checked, local user groups will be created for group names present in the groups claim, if they do not exist yet locally.", + verbose_name="Create local user groups if they do not exist yet", + ), + ), + ] diff --git a/mozilla_django_oidc_db/models.py b/mozilla_django_oidc_db/models.py index 8789df8..3a8b7b3 100644 --- a/mozilla_django_oidc_db/models.py +++ b/mozilla_django_oidc_db/models.py @@ -259,12 +259,11 @@ class OpenIDConnectConfig(CachingMixin, OpenIDConnectConfigBase): ), ) sync_groups = models.BooleanField( - _("synchronize groups"), + _("Create local user groups if they do not exist yet"), default=True, help_text=_( - "Synchronize the local user groups with the provided groups. Note that this " - "means a user is removed from all groups if there is no group claim. " - "Uncheck to manage groups manually." + "If checked, local user groups will be created for group names present in " + "the groups claim, if they do not exist yet locally." ), ) sync_groups_glob_pattern = models.CharField(