This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/channels/in_ldap/migrations/0001_initial.py

132 lines
4.6 KiB
Python
Raw Normal View History

# Generated by Django 3.0.5 on 2020-05-15 19:59
2018-11-26 16:18:56 +00:00
2019-10-10 15:36:09 +00:00
import django.core.validators
2018-11-26 16:18:56 +00:00
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("passbook_core", "__first__"),
2018-11-26 16:18:56 +00:00
]
operations = [
2019-10-10 15:36:09 +00:00
migrations.CreateModel(
2019-12-31 11:51:16 +00:00
name="LDAPPropertyMapping",
2019-10-10 15:36:09 +00:00
fields=[
2019-12-31 11:51:16 +00:00
(
"propertymapping_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="passbook_core.PropertyMapping",
),
),
("object_field", models.TextField()),
2019-10-10 15:36:09 +00:00
],
options={
"verbose_name": "LDAP Property Mapping",
"verbose_name_plural": "LDAP Property Mappings",
},
2019-12-31 11:51:16 +00:00
bases=("passbook_core.propertymapping",),
2019-10-10 15:36:09 +00:00
),
2018-11-26 16:18:56 +00:00
migrations.CreateModel(
name="LDAPInlet",
2018-11-26 16:18:56 +00:00
fields=[
2019-12-31 11:51:16 +00:00
(
"inlet_ptr",
2019-12-31 11:51:16 +00:00
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="passbook_core.Inlet",
2019-12-31 11:51:16 +00:00
),
),
(
"server_uri",
models.TextField(
2019-12-31 11:51:16 +00:00
validators=[
django.core.validators.URLValidator(
schemes=["ldap", "ldaps"]
)
],
verbose_name="Server URI",
2019-12-31 11:51:16 +00:00
),
),
("bind_cn", models.TextField(verbose_name="Bind CN")),
2019-12-31 11:51:16 +00:00
("bind_password", models.TextField()),
(
"start_tls",
models.BooleanField(default=False, verbose_name="Enable Start TLS"),
),
("base_dn", models.TextField(verbose_name="Base DN")),
2019-12-31 11:51:16 +00:00
(
"additional_user_dn",
models.TextField(
help_text="Prepended to Base DN for User-queries.",
verbose_name="Addition User DN",
2019-12-31 11:51:16 +00:00
),
),
(
"additional_group_dn",
models.TextField(
help_text="Prepended to Base DN for Group-queries.",
verbose_name="Addition Group DN",
),
),
(
"user_object_filter",
models.TextField(
default="(objectCategory=Person)",
help_text="Consider Objects matching this filter to be Users.",
),
),
(
"user_group_membership_field",
models.TextField(
default="memberOf",
help_text="Field which contains Groups of user.",
),
),
(
"group_object_filter",
models.TextField(
default="(objectCategory=Group)",
help_text="Consider Objects matching this filter to be Groups.",
),
),
(
"object_uniqueness_field",
models.TextField(
default="objectSid",
help_text="Field which contains a unique Identifier.",
2019-12-31 11:51:16 +00:00
),
),
("sync_groups", models.BooleanField(default=True)),
(
"sync_parent_group",
models.ForeignKey(
blank=True,
default=None,
null=True,
2019-12-31 11:51:16 +00:00
on_delete=django.db.models.deletion.SET_DEFAULT,
to="passbook_core.Group",
),
),
2018-11-26 16:18:56 +00:00
],
options={
"verbose_name": "LDAP Inlet",
"verbose_name_plural": "LDAP Inlets",
2018-11-26 16:18:56 +00:00
},
bases=("passbook_core.inlet",),
2018-11-26 16:18:56 +00:00
),
]