• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ephios-dev / ephios / 11999889548

24 Nov 2024 09:53PM UTC coverage: 85.182% (+0.02%) from 85.162%
11999889548

Pull #1420

github

web-flow
Merge 1ff18675b into 09bb5212f
Pull Request #1420: Add qualification claim to Identity Provider

2950 of 3493 branches covered (84.45%)

Branch coverage included in aggregate %.

56 of 66 new or added lines in 8 files covered. (84.85%)

2 existing lines in 1 file now uncovered.

11996 of 14053 relevant lines covered (85.36%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/ephios/core/migrations/0030_identityprovider_internal_name_and_more.py
1
# Generated by Django 5.0.8 on 2024-11-22 09:25
2

3
from django.db import migrations, models
1✔
4

5

6
def set_idp_internal_names(apps, schema_editor):
1✔
7
    IdentityProvider = apps.get_model("core", "IdentityProvider")
1✔
8
    for idp in IdentityProvider.objects.all():
1!
NEW
9
        idp.internal_name = idp.label
×
NEW
10
        idp.save()
×
11

12

13
class Migration(migrations.Migration):
1✔
14

15
    dependencies = [
1✔
16
        ("core", "0029_alter_userprofile_date_of_birth"),
17
    ]
18

19
    operations = [
1✔
20
        migrations.AddField(
21
            model_name="identityprovider",
22
            name="internal_name",
23
            field=models.CharField(
24
                help_text="Internal name for this provider.",
25
                max_length=255,
26
                unique=False,
27
                verbose_name="internal name",
28
            ),
29
        ),
30
        migrations.AddField(
31
            model_name="identityprovider",
32
            name="qualification_claim",
33
            field=models.CharField(
34
                blank=True,
35
                help_text="The name of the claim that contains the user's qualifications. Leave empty if your provider does not support this. You can use dot notation to access nested claims.",
36
                max_length=254,
37
                verbose_name="qualification claim",
38
            ),
39
        ),
40
        migrations.AddField(
41
            model_name="identityprovider",
42
            name="qualification_codename_to_uuid",
43
            field=models.JSONField(
44
                default=dict,
45
                blank=True,
46
                help_text="A json encoded dictionary containing mappings of qualification names as they appear in thequalification claim to the qualification uuid. If a key is not found, use the key directly.",
47
                verbose_name="qualification codename to uuid",
48
            ),
49
        ),
50
        migrations.AlterField(
51
            model_name="identityprovider",
52
            name="group_claim",
53
            field=models.CharField(
54
                blank=True,
55
                default="",
56
                help_text="The name of the claim that contains the user's groups. Leave empty if your provider does not support this. You can use dot notation to access nested claims.",
57
                max_length=254,
58
                verbose_name="group claim",
59
            ),
60
            preserve_default=False,
61
        ),
62
        migrations.RunPython(set_idp_internal_names),
63
    ]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc