Projet

Général

Profil

0001-idp-cas-add-help-text-for-CAS-service-s-urls-and-ide.patch

Benjamin Renard, 16 janvier 2023 10:15

Télécharger (3,09 ko)

Voir les différences:

Subject: [PATCH] idp cas: add help text for CAS service's urls and identifier
 attribute (#61593)

License: MIT
 .../migrations/0016_auto_20220210_1925.py     | 30 +++++++++++++++++++
 src/authentic2_idp_cas/models.py              | 17 +++++++++--
 2 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 src/authentic2_idp_cas/migrations/0016_auto_20220210_1925.py
src/authentic2_idp_cas/migrations/0016_auto_20220210_1925.py
1
# Generated by Django 2.2.27 on 2022-02-10 18:25
2

  
3
from django.db import migrations, models
4

  
5

  
6
class Migration(migrations.Migration):
7

  
8
    dependencies = [
9
        ('authentic2_idp_cas', '0015_auto_20170406_1825'),
10
    ]
11

  
12
    operations = [
13
        migrations.AlterField(
14
            model_name='service',
15
            name='identifier_attribute',
16
            field=models.CharField(
17
                help_text='The attribute transmited as the user identifier.',
18
                max_length=64,
19
                verbose_name='identifier attribute name',
20
            ),
21
        ),
22
        migrations.AlterField(
23
            model_name='service',
24
            name='urls',
25
            field=models.TextField(
26
                help_text='A CAS application, when interacting with a CAS server, is identified by its service URL. Specify here one or more service URLs used by the application, separating them with spaces. The service URL used by the application will match if equals or starts with one of the URLs specified here.',
27
                verbose_name='urls',
28
            ),
29
        ),
30
    ]
src/authentic2_idp_cas/models.py
32 32

  
33 33

  
34 34
class Service(LogoutUrlAbstract, BaseService):
35
    urls = models.TextField(verbose_name=_('urls'))
36
    identifier_attribute = models.CharField(max_length=64, verbose_name=_('attribute name'), blank=False)
35
    urls = models.TextField(
36
        verbose_name=_('urls'),
37
        help_text=_(
38
            "A CAS application, when interacting with a CAS server, is identified by its service URL."
39
            " Specify here one or more service URLs used by the application, separating them with"
40
            " spaces. The service URL used by the application will match if equals or starts with one"
41
            " of the URLs specified here."
42
        ),
43
    )
44
    identifier_attribute = models.CharField(
45
        max_length=64,
46
        verbose_name=_('identifier attribute name'),
47
        help_text=_('The attribute transmited as the user identifier.'),
48
        blank=False,
49
    )
37 50
    proxy = models.ManyToManyField(
38 51
        'self',
39 52
        blank=True,
40
-