2020-05-20 07:17:06 +00:00
|
|
|
# Generated by Django 3.0.6 on 2020-05-19 22:08
|
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 = [
|
2019-12-31 11:51:16 +00:00
|
|
|
("passbook_core", "0001_initial"),
|
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
|
|
|
],
|
2020-05-20 07:17:06 +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(
|
2019-12-31 11:51:16 +00:00
|
|
|
name="LDAPSource",
|
2018-11-26 16:18:56 +00:00
|
|
|
fields=[
|
2019-12-31 11:51:16 +00:00
|
|
|
(
|
|
|
|
"source_ptr",
|
|
|
|
models.OneToOneField(
|
|
|
|
auto_created=True,
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
parent_link=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
to="passbook_core.Source",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"server_uri",
|
2020-05-20 07:17:06 +00:00
|
|
|
models.TextField(
|
2019-12-31 11:51:16 +00:00
|
|
|
validators=[
|
|
|
|
django.core.validators.URLValidator(
|
|
|
|
schemes=["ldap", "ldaps"]
|
|
|
|
)
|
2020-05-20 07:17:06 +00:00
|
|
|
],
|
|
|
|
verbose_name="Server URI",
|
2019-12-31 11:51:16 +00:00
|
|
|
),
|
|
|
|
),
|
2020-05-20 07:17:06 +00:00
|
|
|
("bind_cn", models.TextField(verbose_name="Bind CN")),
|
2019-12-31 11:51:16 +00:00
|
|
|
("bind_password", models.TextField()),
|
2020-05-20 07:17:06 +00:00
|
|
|
(
|
|
|
|
"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(
|
2020-05-20 07:17:06 +00:00
|
|
|
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(
|
2020-05-20 07:17:06 +00:00
|
|
|
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,
|
2020-05-20 07:17:06 +00:00
|
|
|
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={
|
2019-12-31 11:51:16 +00:00
|
|
|
"verbose_name": "LDAP Source",
|
|
|
|
"verbose_name_plural": "LDAP Sources",
|
2018-11-26 16:18:56 +00:00
|
|
|
},
|
2019-12-31 11:51:16 +00:00
|
|
|
bases=("passbook_core.source",),
|
2018-11-26 16:18:56 +00:00
|
|
|
),
|
|
|
|
]
|