Cleanup migrations (again)

This commit is contained in:
Jens Langhammer 2018-12-10 10:49:50 +01:00
parent 9cccc0a757
commit 1a8f3fb18a
15 changed files with 57 additions and 265 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 2.1.3 on 2018-11-25 10:39
# Generated by Django 2.1.4 on 2018-12-10 09:15
import uuid
@ -33,6 +33,7 @@ class Migration(migrations.Migration):
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
],
@ -60,6 +61,7 @@ class Migration(migrations.Migration):
('name', models.TextField(blank=True, null=True)),
('action', models.CharField(choices=[('allow', 'allow'), ('deny', 'deny')], max_length=20)),
('negate', models.BooleanField(default=False)),
('order', models.IntegerField(default=0)),
],
options={
'abstract': False,
@ -93,23 +95,38 @@ class Migration(migrations.Migration):
('launch_url', models.URLField(blank=True, null=True)),
('icon_url', models.TextField(blank=True, null=True)),
('skip_authorization', models.BooleanField(default=False)),
('provider', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='passbook_core.Provider')),
('provider', models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='passbook_core.Provider')),
],
options={
'abstract': False,
},
bases=('passbook_core.rulemodel',),
),
migrations.CreateModel(
name='DebugRule',
fields=[
('rule_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Rule')),
('result', models.BooleanField(default=False)),
('wait_min', models.IntegerField(default=5)),
('wait_max', models.IntegerField(default=30)),
],
options={
'verbose_name': 'Debug Rule',
'verbose_name_plural': 'Debug Rules',
},
bases=('passbook_core.rule',),
),
migrations.CreateModel(
name='FieldMatcherRule',
fields=[
('rule_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Rule')),
('user_field', models.TextField()),
('match_action', models.CharField(choices=[('startswith', 'startswith'), ('endswith', 'endswith'), ('endswith', 'contains'), ('regexp', 'regexp'), ('exact', 'exact')], max_length=50)),
('match_action', models.CharField(choices=[('startswith', 'Starts with'), ('endswith', 'Ends with'), ('endswith', 'Contains'), ('regexp', 'Regexp'), ('exact', 'Exact')], max_length=50)),
('value', models.TextField()),
],
options={
'abstract': False,
'verbose_name': 'Field matcher Rule',
'verbose_name_plural': 'Field matcher Rules',
},
bases=('passbook_core.rule',),
),
@ -126,6 +143,23 @@ class Migration(migrations.Migration):
},
bases=('passbook_core.rulemodel',),
),
migrations.CreateModel(
name='WebhookRule',
fields=[
('rule_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Rule')),
('url', models.URLField()),
('method', models.CharField(choices=[('GET', 'GET'), ('POST', 'POST'), ('PATCH', 'PATCH'), ('DELETE', 'DELETE'), ('PUT', 'PUT')], max_length=10)),
('json_body', models.TextField()),
('json_headers', models.TextField()),
('result_jsonpath', models.TextField()),
('result_json_value', models.TextField()),
],
options={
'verbose_name': 'Webhook Rule',
'verbose_name_plural': 'Webhook Rules',
},
bases=('passbook_core.rule',),
),
migrations.AddField(
model_name='rulemodel',
name='rules',

View File

@ -1,19 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-25 16:38
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='application',
name='provider',
field=models.OneToOneField(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='passbook_core.Provider'),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-25 19:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0002_auto_20181125_1638'),
]
operations = [
migrations.AddField(
model_name='rule',
name='order',
field=models.IntegerField(default=0),
),
]

View File

@ -1,40 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-27 13:41
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0003_rule_order'),
]
operations = [
migrations.CreateModel(
name='WebhookRule',
fields=[
('rule_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Rule')),
('url', models.URLField()),
('method', models.CharField(choices=[('get', 'get'), ('post', 'post'), ('patch', 'patch'), ('delete', 'delete'), ('put', 'put')], max_length=10)),
('json_body', models.TextField()),
('json_headers', models.TextField()),
('result_jsonpath', models.TextField()),
('result_json_value', models.TextField()),
],
options={
'verbose_name': 'Webhook Rule',
'verbose_name_plural': 'Webhook Rules',
},
bases=('passbook_core.rule',),
),
migrations.AlterModelOptions(
name='fieldmatcherrule',
options={'verbose_name': 'Field matcher Rule', 'verbose_name_plural': 'Field matcher Rules'},
),
migrations.AlterField(
model_name='fieldmatcherrule',
name='match_action',
field=models.CharField(choices=[('startswith', 'Starts with'), ('endswith', 'Ends with'), ('endswith', 'Contains'), ('regexp', 'Regexp'), ('exact', 'Exact')], max_length=50),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-27 15:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0004_auto_20181127_1341'),
]
operations = [
migrations.AlterField(
model_name='webhookrule',
name='method',
field=models.CharField(choices=[('GET', 'GET'), ('POST', 'POST'), ('PATCH', 'PATCH'), ('DELETE', 'DELETE'), ('PUT', 'PUT')], max_length=10),
),
]

View File

@ -1,20 +0,0 @@
# Generated by Django 2.1.4 on 2018-12-09 17:58
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0005_auto_20181127_1522'),
]
operations = [
migrations.AddField(
model_name='user',
name='uuid',
field=models.UUIDField(default=uuid.uuid4, editable=False),
),
]

View File

@ -1,28 +0,0 @@
# Generated by Django 2.1.4 on 2018-12-09 18:58
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0006_user_uuid'),
]
operations = [
migrations.CreateModel(
name='DebugRule',
fields=[
('rule_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Rule')),
('result', models.BooleanField(default=False)),
('wait_min', models.IntegerField(default=5)),
('wait_max', models.IntegerField(default=30)),
],
options={
'verbose_name': 'Debug Rule',
'verbose_name_plural': 'Debug Rules',
},
bases=('passbook_core.rule',),
),
]

View File

@ -2,7 +2,7 @@
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
from passbook.core.models import Application
class OverviewView(LoginRequiredMixin, TemplateView):
"""Overview for logged in user, incase user opens passbook directly
@ -12,4 +12,6 @@ class OverviewView(LoginRequiredMixin, TemplateView):
def get_context_data(self, **kwargs):
kwargs['applications'] = self.request.user.applications.all()
if self.request.user.is_superuser:
kwargs['applications'] = Application.objects.all()
return super().get_context_data(**kwargs)

View File

@ -1,4 +1,4 @@
# Generated by Django 2.1.3 on 2018-11-26 15:17
# Generated by Django 2.1.4 on 2018-12-10 09:16
import django.db.models.deletion
from django.db import migrations, models
@ -9,7 +9,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('passbook_core', '0003_rule_order'),
('passbook_core', '0001_initial'),
]
operations = [
@ -20,7 +20,7 @@ class Migration(migrations.Migration):
('server_uri', models.TextField()),
('bind_cn', models.TextField()),
('bind_password', models.TextField()),
('type', models.CharField(choices=[('ad', 'ad'), ('generic', 'generic')], max_length=20)),
('type', models.CharField(choices=[('ad', 'Active Directory'), ('generic', 'Generic')], max_length=20)),
('domain', models.TextField()),
('base_dn', models.TextField()),
('create_user', models.BooleanField(default=False)),

View File

@ -1,18 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-27 13:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_ldap', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ldapsource',
name='type',
field=models.CharField(choices=[('ad', 'Active Directory'), ('generic', 'Generic')], max_length=20),
),
]

View File

@ -1,4 +1,4 @@
# Generated by Django 2.1.3 on 2018-11-25 10:39
# Generated by Django 2.1.4 on 2018-12-10 09:16
import django.db.models.deletion
from django.db import migrations, models

View File

@ -1,4 +1,4 @@
# Generated by Django 2.1.3 on 2018-11-25 10:39
# Generated by Django 2.1.4 on 2018-12-10 09:16
import django.db.models.deletion
from django.db import migrations, models
@ -14,15 +14,22 @@ class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
name='SAMLApplication',
name='SAMLProvider',
fields=[
('application_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Application')),
('provider_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Provider')),
('name', models.TextField()),
('acs_url', models.URLField()),
('processor_path', models.CharField(max_length=255)),
('issuer', models.TextField()),
('assertion_valid_for', models.IntegerField(default=86400)),
('signing', models.BooleanField(default=True)),
('signing_cert', models.TextField()),
('signing_key', models.TextField()),
],
options={
'abstract': False,
'verbose_name': 'SAML Provider',
'verbose_name_plural': 'SAML Providers',
},
bases=('passbook_core.application',),
bases=('passbook_core.provider',),
),
]

View File

@ -1,32 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-26 15:09
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_core', '0003_rule_order'),
('passbook_saml_idp', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='SAMLProvider',
fields=[
('provider_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='passbook_core.Provider')),
('name', models.TextField()),
('acs_url', models.URLField()),
('processor_path', models.CharField(max_length=255)),
],
bases=('passbook_core.provider',),
),
migrations.RemoveField(
model_name='samlapplication',
name='application_ptr',
),
migrations.DeleteModel(
name='SAMLApplication',
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 2.1.3 on 2018-11-26 15:14
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('passbook_saml_idp', '0002_auto_20181126_1509'),
]
operations = [
migrations.AlterModelOptions(
name='samlprovider',
options={'verbose_name': 'SAML Provider', 'verbose_name_plural': 'SAML Providers'},
),
]

View File

@ -1,41 +0,0 @@
# Generated by Django 2.1.4 on 2018-12-09 22:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('passbook_saml_idp', '0003_auto_20181126_1514'),
]
operations = [
migrations.AddField(
model_name='samlprovider',
name='assertion_valid_for',
field=models.IntegerField(default=86400),
),
migrations.AddField(
model_name='samlprovider',
name='issuer',
field=models.TextField(default=''),
preserve_default=False,
),
migrations.AddField(
model_name='samlprovider',
name='signing',
field=models.BooleanField(default=True),
),
migrations.AddField(
model_name='samlprovider',
name='signing_cert',
field=models.TextField(default=''),
preserve_default=False,
),
migrations.AddField(
model_name='samlprovider',
name='signing_key',
field=models.TextField(default=''),
preserve_default=False,
),
]