diff --git a/aleksis/apps/postbuero/migrations/0001_initial.py b/aleksis/apps/postbuero/migrations/0001_initial.py index e5c8659b29b5d1454c0825da459d11038b182b2b..6735ef507b87d081db4adb6015deb75d8157c61c 100644 --- a/aleksis/apps/postbuero/migrations/0001_initial.py +++ b/aleksis/apps/postbuero/migrations/0001_initial.py @@ -1,9 +1,10 @@ # Generated by Django 3.2.11 on 2022-01-19 21:25 -import django.contrib.sites.managers from django.db import migrations, models import django.db.models.deletion +import aleksis.core.managers + class Migration(migrations.Migration): @@ -30,7 +31,7 @@ class Migration(migrations.Migration): 'verbose_name_plural': 'Mail addresses', }, managers=[ - ('objects', django.contrib.sites.managers.CurrentSiteManager()), + ('objects', aleksis.core.managers.AlekSISBaseManager()), ], ), migrations.AddConstraint( diff --git a/aleksis/apps/postbuero/migrations/0002_maildomain.py b/aleksis/apps/postbuero/migrations/0002_maildomain.py index 0025a7e971697373dc269c2189e92fc1c2fa4341..61c96ced6891c7e8bb560b2b28a497f9bfd128d5 100644 --- a/aleksis/apps/postbuero/migrations/0002_maildomain.py +++ b/aleksis/apps/postbuero/migrations/0002_maildomain.py @@ -1,9 +1,10 @@ # Generated by Django 3.2.12 on 2022-02-01 18:47 -import django.contrib.sites.managers from django.db import migrations, models import django.db.models.deletion +import aleksis.core.managers + class Migration(migrations.Migration): @@ -27,7 +28,7 @@ class Migration(migrations.Migration): 'abstract': False, }, managers=[ - ('objects', django.contrib.sites.managers.CurrentSiteManager()), + ('objects', aleksis.core.managers.AlekSISBaseManager()), ], ), migrations.AlterField( diff --git a/aleksis/apps/postbuero/migrations/0006_alter_mailaddress_managers_alter_mailalias_managers_and_more.py b/aleksis/apps/postbuero/migrations/0006_alter_mailaddress_managers_alter_mailalias_managers_and_more.py new file mode 100644 index 0000000000000000000000000000000000000000..8bd28d63e9a503e8019166601d2f397da9e66969 --- /dev/null +++ b/aleksis/apps/postbuero/migrations/0006_alter_mailaddress_managers_alter_mailalias_managers_and_more.py @@ -0,0 +1,32 @@ +# Generated by Django 4.2.3 on 2023-07-22 11:05 + +import aleksis.core.managers +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + ('sites', '0002_alter_domain_unique'), + ('postbuero', '0005_group_address'), + ] + + operations = [ + migrations.AddField( + model_name='mailaddress', + name='managed_by_app_label', + field=models.CharField(blank=True, editable=False, max_length=255, verbose_name='App label of app responsible for managing this instance'), + ), + migrations.AddField( + model_name='mailalias', + name='managed_by_app_label', + field=models.CharField(blank=True, editable=False, max_length=255, verbose_name='App label of app responsible for managing this instance'), + ), + migrations.AddField( + model_name='maildomain', + name='managed_by_app_label', + field=models.CharField(blank=True, editable=False, max_length=255, verbose_name='App label of app responsible for managing this instance'), + ), + ] diff --git a/aleksis/apps/postbuero/schema.py b/aleksis/apps/postbuero/schema.py index 11ea7ad38269633da87e9e5341f77279154593c7..d58d8412451b8602f793060a2103dc743557dd61 100644 --- a/aleksis/apps/postbuero/schema.py +++ b/aleksis/apps/postbuero/schema.py @@ -37,6 +37,7 @@ class MailAddressCreateMutation(DjangoCreateMutation): class Meta: model = MailAddress permissions = ("postbuero.create_mailaddress",) + exclude_fields = ("managed_by_app_label",) @classmethod def before_save(cls, root, info, input, obj): # noqa @@ -89,6 +90,7 @@ class MailDomainCreateMutation(DjangoCreateMutation): class Meta: model = MailDomain permissions = ("postbuero.create_maildomain",) + exclude_fields = ("managed_by_app_label",) class MailDomainDeleteMutation(DeleteMutation): @@ -99,7 +101,7 @@ class MailDomainDeleteMutation(DeleteMutation): class MailDomainBatchPatchMutation(PermissionBatchPatchMixin, DjangoBatchPatchMutation): class Meta: model = MailDomain - permissions = "postbuero.change_maildomain" + permissions = ("postbuero.change_maildomain",) class Query(graphene.ObjectType): diff --git a/pyproject.toml b/pyproject.toml index 83cc1a497b942f47419cf391bc14d07c0a6eed8d..45c6d15a086c0a83fcc4343decca0a280379d726 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "AlekSIS-App-Postbuero" -version = "2.0b0" +version = "3.0.dev0" packages = [ { include = "aleksis" } ] @@ -25,7 +25,7 @@ secondary = true [tool.poetry.dependencies] python = "^3.9" -AlekSIS-Core = "^3.0b0" +AlekSIS-Core = "^4.0.0.dev0" [tool.poetry.dev-dependencies] aleksis-builddeps = "*"