From 6a09521dc4e07f971eac49bc5e8503cf4c6ff556 Mon Sep 17 00:00:00 2001
From: Konrad Mohrfeldt <konrad.mohrfeldt@farbdev.org>
Date: Wed, 30 Aug 2023 17:05:17 +0200
Subject: [PATCH] feat: add is_use_explicitly_granted_by_author flag to Image
 model

This is the counterpart to the
requires_express_permission_for_publication field of the License model.
---
 ...image_is_use_explicitly_granted_by_author.py | 17 +++++++++++++++++
 program/models.py                               |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 program/migrations/0070_image_is_use_explicitly_granted_by_author.py

diff --git a/program/migrations/0070_image_is_use_explicitly_granted_by_author.py b/program/migrations/0070_image_is_use_explicitly_granted_by_author.py
new file mode 100644
index 00000000..aa071f21
--- /dev/null
+++ b/program/migrations/0070_image_is_use_explicitly_granted_by_author.py
@@ -0,0 +1,17 @@
+# Generated by Django 4.2.2 on 2023-08-30 14:57
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+    dependencies = [
+        ("program", "0069_alter_license_url"),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name="image",
+            name="is_use_explicitly_granted_by_author",
+            field=models.BooleanField(default=False),
+        ),
+    ]
diff --git a/program/models.py b/program/models.py
index a9a14eb8..9ed90da5 100644
--- a/program/models.py
+++ b/program/models.py
@@ -130,6 +130,7 @@ class License(models.Model):
 class Image(models.Model):
     alt_text = models.TextField(blank=True, default="")
     credits = models.TextField(blank=True, default="")
+    is_use_explicitly_granted_by_author = models.BooleanField(default=False)
     height = models.PositiveIntegerField(blank=True, null=True)
     image = VersatileImageField(
         blank=True,
-- 
GitLab