Projet

Général

Profil

0001-authenticators-add-explanations-on-each-configuratio.patch

Valentin Deniaud, 29 septembre 2022 11:38

Télécharger (3,7 ko)

Voir les différences:

Subject: [PATCH] authenticators: add explanations on each configuration tabs
 (#68804)

 src/authentic2/apps/authenticators/models.py                | 2 ++
 .../authentic2/authenticators/authenticator_detail.html     | 1 +
 src/authentic2_auth_oidc/models.py                          | 2 ++
 src/authentic2_auth_saml/models.py                          | 6 ++++++
 4 files changed, 11 insertions(+)
src/authentic2/apps/authenticators/models.py
166 166
    condition = models.CharField(_('Condition (unused)'), editable=False, max_length=256, blank=True)
167 167
    mandatory = models.BooleanField(_('Mandatory (unused)'), editable=False, default=False)
168 168

  
169
    description = _('Add roles to users on successful login.')
170

  
169 171
    class Meta:
170 172
        default_related_name = 'add_role_actions'
171 173
        verbose_name = _('Add a role')
src/authentic2/apps/authenticators/templates/authentic2/authenticators/authenticator_detail.html
52 52
        </div>
53 53
        {% for model, objects in object.related_models.items %}
54 54
          <div aria-labelledby="tab-{{ model.model_name }}" hidden="" id="panel-{{ model.model_name }}" role="tabpanel" tabindex="0">
55
            <p>{{ model.description }}</p>
55 56
            {% include 'authentic2/authenticators/related_object_list.html' with object_list=objects model_name=model.model_name %}
56 57
          </div>
57 58
        {% endfor %}
src/authentic2_auth_oidc/models.py
258 258

  
259 259
    objects = managers.OIDCClaimMappingManager()
260 260

  
261
    description = _('Set user fields using claims.')
262

  
261 263
    class Meta:
262 264
        default_related_name = 'claim_mappings'
263 265
        verbose_name = _('Claim')
src/authentic2_auth_saml/models.py
220 220
    saml_attribute = models.CharField(_('SAML attribute'), max_length=1024)
221 221
    ignore_case = models.BooleanField(_('Ignore case'), default=False)
222 222

  
223
    description = _(
224
        'Define which attributes are used to establish the link with an identity provider account.'
225
    )
226

  
223 227
    class Meta:
224 228
        default_related_name = 'attribute_lookups'
225 229
        verbose_name = _('Attribute lookup')
......
252 256
    saml_attribute = models.CharField(_('SAML attribute name'), max_length=1024)
253 257
    mandatory = models.BooleanField(_('Mandatory'), default=False, help_text=_('Deny login if action fails.'))
254 258

  
259
    description = _('Set user fields using received SAML attributes.')
260

  
255 261
    class Meta:
256 262
        default_related_name = 'set_attribute_actions'
257 263
        verbose_name = _('Set an attribute')
258
-