# Generated by Django 4.2.9 on 2024-05-01 16:10

from django.db import migrations, models

import mozilla_django_oidc_db.fields


class Migration(migrations.Migration):

    dependencies = [
        ("mozilla_django_oidc_db", "0001_initial_to_v015"),
    ]

    operations = [
        migrations.AddField(
            model_name="openidconnectconfig",
            name="new_groups_claim",
            field=mozilla_django_oidc_db.fields.ClaimField(
                base_field=models.CharField(
                    max_length=50, verbose_name="claim path segment"
                ),
                blank=True,
                default=mozilla_django_oidc_db.fields.ClaimFieldDefault("roles"),
                help_text="The name of the OIDC claim that holds the values to map to local user groups.",
                size=None,
                verbose_name="groups claim",
            ),
        ),
        migrations.AddField(
            model_name="openidconnectconfig",
            name="new_username_claim",
            field=mozilla_django_oidc_db.fields.ClaimField(
                base_field=models.CharField(
                    max_length=50, verbose_name="claim path segment"
                ),
                default=mozilla_django_oidc_db.fields.ClaimFieldDefault("sub"),
                help_text="The name of the OIDC claim that is used as the username",
                size=None,
                verbose_name="username claim",
            ),
        ),
        migrations.RemoveField(
            model_name="openidconnectconfig",
            name="groups_claim",
        ),
        migrations.RemoveField(
            model_name="openidconnectconfig",
            name="username_claim",
        ),
        migrations.RenameField(
            model_name="openidconnectconfig",
            old_name="new_groups_claim",
            new_name="groups_claim",
        ),
        migrations.RenameField(
            model_name="openidconnectconfig",
            old_name="new_username_claim",
            new_name="username_claim",
        ),
    ]
