summaryrefslogtreecommitdiff
path: root/ishtar_common/migrations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-10-21 19:41:49 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-19 14:43:48 +0100
commit0b8933306e071f626af0ff2250bca962c1a03090 (patch)
tree9022a85264942c5bf5fb6db8ffaab01844feced6 /ishtar_common/migrations
parentc93dd3812c53d21ab8517dc7af72e1d4b70a1b04 (diff)
downloadIshtar-0b8933306e071f626af0ff2250bca962c1a03090.tar.bz2
Ishtar-0b8933306e071f626af0ff2250bca962c1a03090.zip
🗃️ permissions refactoring: add permission request model - link between main item and ishtar users
Diffstat (limited to 'ishtar_common/migrations')
-rw-r--r--ishtar_common/migrations/0254_permissionrequests.py158
1 files changed, 158 insertions, 0 deletions
diff --git a/ishtar_common/migrations/0254_permissionrequests.py b/ishtar_common/migrations/0254_permissionrequests.py
new file mode 100644
index 000000000..26b902512
--- /dev/null
+++ b/ishtar_common/migrations/0254_permissionrequests.py
@@ -0,0 +1,158 @@
+# Generated by Django 2.2.24 on 2024-10-21 19:18
+
+from django.db import migrations, models
+import django.db.models.deletion
+import ishtar_common.utils
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('contenttypes', '0002_remove_content_type_name'),
+ ('ishtar_common', '0253_display_news'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='biographicalnote',
+ name='ishtar_users',
+ field=models.ManyToManyField(blank=True, related_name='biographicalnote_permission_associated', to='ishtar_common.IshtarUser'),
+ ),
+ migrations.AddField(
+ model_name='document',
+ name='ishtar_users',
+ field=models.ManyToManyField(blank=True, related_name='document_permission_associated', to='ishtar_common.IshtarUser'),
+ ),
+ migrations.AddField(
+ model_name='organization',
+ name='ishtar_users',
+ field=models.ManyToManyField(blank=True, related_name='organization_permission_associated', to='ishtar_common.IshtarUser'),
+ ),
+ migrations.AddField(
+ model_name='person',
+ name='ishtar_users',
+ field=models.ManyToManyField(blank=True, related_name='person_permission_associated', to='ishtar_common.IshtarUser'),
+ ),
+ migrations.AlterField(
+ model_name='document',
+ name='associated_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to=ishtar_common.utils.get_image_path, verbose_name='Associated file'),
+ ),
+ migrations.AlterField(
+ model_name='document',
+ name='image',
+ field=models.ImageField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to=ishtar_common.utils.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='document',
+ name='thumbnail',
+ field=models.ImageField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to=ishtar_common.utils.get_image_path),
+ ),
+ migrations.AlterField(
+ model_name='documenttemplate',
+ name='export_format',
+ field=models.CharField(blank=True, choices=[('docx', 'DOCX'), ('html', 'HTML'), ('pdf', 'PDF'), ('xlsx', 'XLSX')], default='', max_length=4, verbose_name='Export format'),
+ ),
+ migrations.AlterField(
+ model_name='documenttemplate',
+ name='label_template',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, null=True, upload_to='templates/%Y/', verbose_name='Base template for labels'),
+ ),
+ migrations.AlterField(
+ model_name='documenttemplate',
+ name='template',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, null=True, upload_to='templates/%Y/', verbose_name='Template'),
+ ),
+ migrations.AlterField(
+ model_name='historicaldocument',
+ name='associated_file',
+ field=models.TextField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, verbose_name='Associated file'),
+ ),
+ migrations.AlterField(
+ model_name='historicaldocument',
+ name='image',
+ field=models.TextField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True),
+ ),
+ migrations.AlterField(
+ model_name='historicaldocument',
+ name='thumbnail',
+ field=models.TextField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='archive_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Archive file'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='error_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Error file'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='imported_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=220, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Imported file'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='imported_images',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=220, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Associated documents (zip file)'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='imported_values',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=220, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Imported values'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='match_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Match file'),
+ ),
+ migrations.AlterField(
+ model_name='import',
+ name='result_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Result file'),
+ ),
+ migrations.AlterField(
+ model_name='importgroup',
+ name='archive_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=255, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Archive file'),
+ ),
+ migrations.AlterField(
+ model_name='importgroup',
+ name='imported_file',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=220, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Imported file'),
+ ),
+ migrations.AlterField(
+ model_name='importgroup',
+ name='imported_images',
+ field=models.FileField(blank=True, help_text=ishtar_common.utils.max_size_help, max_length=220, null=True, upload_to='upload/imports/%Y/%m/', verbose_name='Associated documents (zip file)'),
+ ),
+ migrations.CreateModel(
+ name='PermissionRequest',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=200, verbose_name='Name')),
+ ('slug', models.SlugField(unique=True, verbose_name='Slug')),
+ ('request', models.TextField(blank=True, default='', help_text="Use 'text' request used in Ishtar search input", verbose_name='Request')),
+ ('include_associated_items', models.BooleanField(default=True, help_text='All items associated items match the request', verbose_name='Include associated items')),
+ ('include_upstream_items', models.BooleanField(default=True, help_text='All items associated by upstream link math the request. For instance, match is done for all finds associated with own context records', verbose_name='Include upstream items')),
+ ('active', models.BooleanField(default=True, verbose_name='Active')),
+ ('model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='permissions', to='contenttypes.ContentType', verbose_name='Model')),
+ ],
+ options={
+ 'verbose_name': 'Permission request',
+ 'verbose_name_plural': 'Permissions requests',
+ },
+ ),
+ migrations.AddField(
+ model_name='profiletype',
+ name='permission_requests',
+ field=models.ManyToManyField(blank=True, related_name='profile_types', to='ishtar_common.PermissionRequest', verbose_name='Permission request'),
+ ),
+ migrations.AddField(
+ model_name='permissionrequest',
+ name='limit_to_attached_areas',
+ field=models.BooleanField(default=False, help_text='Request is limited to areas attached to the ishtar user', verbose_name='Limit request to attached areas'),
+ )
+ ]