From 97cc4f41f05fcfea598a135a30930002cb92c37d Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 21 Dec 2023 15:08:20 +0100 Subject: [PATCH] :speech_balloon: [#68] More clear label/helptext for sync_groups --- ...2_alter_openidconnectconfig_sync_groups.py | 24 +++++++++++++++++++ mozilla_django_oidc_db/models.py | 7 +++--- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 mozilla_django_oidc_db/migrations/0012_alter_openidconnectconfig_sync_groups.py 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 a40a1b5..021012f 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(