summaryrefslogtreecommitdiff
path: root/ishtar_common/migrations/0254_permissionrequests.py
blob: 68c4891b0f876e9c770699e4d71a6c9f02eb11c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# 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'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='expiration_date',
            field=models.DateField(blank=True, null=True, verbose_name='Expiration date'),
        ),
        migrations.AlterField(
            model_name='profiletype',
            name='permission_requests',
            field=models.ManyToManyField(blank=True, related_name='profile_types', to='ishtar_common.PermissionRequest', verbose_name='Permissions requests'),
        ),
        migrations.AlterField(
            model_name='userprofile',
            name='profile_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='user_profiles', to='ishtar_common.ProfileType', verbose_name='Profile type')
        )
    ]