From f3e0cdd3002bc6f32f69dd0830a05c66013574e7 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 26 Jul 2021 16:36:56 +0200 Subject: [PATCH 2/3] auth_fc: ignore non user_editable attributes when checking missing required attributes (#55836) --- src/authentic2_auth_fc/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/authentic2_auth_fc/views.py b/src/authentic2_auth_fc/views.py index 11e77b49..6d9fca17 100644 --- a/src/authentic2_auth_fc/views.py +++ b/src/authentic2_auth_fc/views.py @@ -359,7 +359,9 @@ class LoginOrLinkView(View): def missing_required_attributes(self, user): '''Compute if user has not filled some required attributes.''' - name_to_label = dict(a2_models.Attribute.objects.filter(required=True).values_list('name', 'label')) + name_to_label = dict( + a2_models.Attribute.objects.filter(required=True, user_editable=True).values_list('name', 'label') + ) required = list(a2_app_settings.A2_REGISTRATION_REQUIRED_FIELDS) + list(name_to_label) missing = [] for attr_name in set(required): -- 2.32.0.rc0