feat: Add permission control to edit and add-to actions

This commit is contained in:
2024-08-06 19:28:03 +02:00
parent 97b19a3b6e
commit 8c51597c29
4 changed files with 86 additions and 12 deletions

View File

@@ -0,0 +1,45 @@
# Generated by Django 5.0.6 on 2024-08-06 17:23
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("fellchensammlung", "0003_subscriptions"),
]
operations = [
migrations.RenameField(
model_name="adoptionnotice",
old_name="created_by",
new_name="owner",
),
migrations.RenameField(
model_name="subscriptions",
old_name="user",
new_name="owner",
),
migrations.AddField(
model_name="animal",
name="owner",
field=models.ForeignKey(
default=1,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
preserve_default=False,
),
migrations.AddField(
model_name="image",
name="owner",
field=models.ForeignKey(
default=1,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
preserve_default=False,
),
]