diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-11-12 17:27:25 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:43:49 +0100 |
commit | ed6d2a764fcc76a0feba1c586acb9afddbecd16b (patch) | |
tree | a81b0bbfc3a45e6f895fc7e70652b94a97abd116 /archaeological_finds | |
parent | ce7d642318f4e4c57dd552915b12eef360d33d70 (diff) | |
download | Ishtar-ed6d2a764fcc76a0feba1c586acb9afddbecd16b.tar.bz2 Ishtar-ed6d2a764fcc76a0feba1c586acb9afddbecd16b.zip |
♻️ clean all "add_own"
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/ishtar_menu.py | 1 | ||||
-rw-r--r-- | archaeological_finds/migrations/0101_squashed.py | 8 | ||||
-rw-r--r-- | archaeological_finds/models_finds.py | 7 | ||||
-rw-r--r-- | archaeological_finds/models_treatments.py | 2 | ||||
-rw-r--r-- | archaeological_finds/urls.py | 5 |
5 files changed, 6 insertions, 17 deletions
diff --git a/archaeological_finds/ishtar_menu.py b/archaeological_finds/ishtar_menu.py index 6ca50182e..717cb6379 100644 --- a/archaeological_finds/ishtar_menu.py +++ b/archaeological_finds/ishtar_menu.py @@ -50,7 +50,6 @@ MENU_SECTIONS = [ model=models.Find, access_controls=[ "archeological_finds.add_find", - "archeological_finds.add_own_find" ], ), MenuItem( diff --git a/archaeological_finds/migrations/0101_squashed.py b/archaeological_finds/migrations/0101_squashed.py index 4cae8d0d5..aa70e2e83 100644 --- a/archaeological_finds/migrations/0101_squashed.py +++ b/archaeological_finds/migrations/0101_squashed.py @@ -99,7 +99,7 @@ class Migration(migrations.Migration): options={ 'verbose_name': 'Base find', 'verbose_name_plural': 'Base finds', - 'permissions': (('view_own_basefind', 'Can view own Base find'), ('add_own_basefind', 'Can add own Base find'), ('change_own_basefind', 'Can change own Base find'), ('delete_own_basefind', 'Can delete own Base find')), + 'permissions': (('view_own_basefind', 'Can view own Base find'), ('change_own_basefind', 'Can change own Base find'), ('delete_own_basefind', 'Can delete own Base find')), }, bases=(ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models_common.FixAssociated, ishtar_common.models.OwnPerms, ishtar_common.models.ValueGetter), ), @@ -231,7 +231,7 @@ class Migration(migrations.Migration): 'verbose_name': 'Find', 'verbose_name_plural': 'Finds', 'ordering': ('cached_label',), - 'permissions': (('view_own_find', 'Can view own Find'), ('add_own_find', 'Can add own Find'), ('change_own_find', 'Can change own Find'), ('delete_own_find', 'Can delete own Find')), + 'permissions': (('view_own_find', 'Can view own Find'), ('change_own_find', 'Can change own Find'), ('delete_own_find', 'Can delete own Find')), }, bases=(ishtar_common.models.ValueGetter, ishtar_common.models.DocumentItem, ishtar_common.models.StatisticItem, ishtar_common.models.TemplateItem, models.Model, ishtar_common.models.CachedGen, ishtar_common.models_common.FixAssociated, ishtar_common.models.ImageContainerModel, ishtar_common.models.OwnPerms, ishtar_common.models.MainItem), ), @@ -598,7 +598,7 @@ class Migration(migrations.Migration): 'verbose_name': 'Treatment', 'verbose_name_plural': 'Treatments', 'ordering': ('-year', '-index', '-start_date'), - 'permissions': (('view_own_treatment', 'Can view own Treatment'), ('add_own_treatment', 'Can add own Treatment'), ('change_own_treatment', 'Can change own Treatment'), ('delete_own_treatment', 'Can delete own Treatment')), + 'permissions': (('view_own_treatment', 'Can view own Treatment'), ('change_own_treatment', 'Can change own Treatment'), ('delete_own_treatment', 'Can delete own Treatment')), }, bases=(ishtar_common.models.DashboardFormItem, ishtar_common.models.ValueGetter, @@ -659,7 +659,7 @@ class Migration(migrations.Migration): 'verbose_name': 'Treatment request', 'verbose_name_plural': 'Treatment requests', 'ordering': ('cached_label',), - 'permissions': (('view_own_treatmentfile', 'Can view own Treatment request'), ('add_own_treatmentfile', 'Can add own Treatment request'), ('change_own_treatmentfile', 'Can change own Treatment request'), ('delete_own_treatmentfile', 'Can delete own Treatment request')), + 'permissions': (('view_own_treatmentfile', 'Can view own Treatment request'), ('change_own_treatmentfile', 'Can change own Treatment request'), ('delete_own_treatmentfile', 'Can delete own Treatment request')), }, bases=(ishtar_common.models.DashboardFormItem, archaeological_operations.models.ClosedItem, diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 8ea623d98..fa3bdb677 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -635,12 +635,6 @@ class BaseFind( class Meta: verbose_name = _("Base find") verbose_name_plural = _("Base finds") - permissions = ( - ("view_own_basefind", "Can view own Base find"), - ("add_own_basefind", "Can add own Base find"), - ("change_own_basefind", "Can change own Base find"), - ("delete_own_basefind", "Can delete own Base find"), - ) indexes = [ GinIndex(fields=["data"]), ] @@ -2365,7 +2359,6 @@ class Find( verbose_name_plural = _("Finds") permissions = ( ("view_own_find", "Can view own Find"), - ("add_own_find", "Can add own Find"), ("change_own_find", "Can change own Find"), ("delete_own_find", "Can delete own Find"), ) diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index a26df8b6a..3adb73624 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -316,7 +316,6 @@ class Treatment( unique_together = ("year", "index") permissions = ( ("view_own_treatment", "Can view own Treatment"), - ("add_own_treatment", "Can add own Treatment"), ("change_own_treatment", "Can change own Treatment"), ("delete_own_treatment", "Can delete own Treatment"), ) @@ -1291,7 +1290,6 @@ class TreatmentFile( unique_together = ("year", "index") permissions = ( ("view_own_treatmentfile", "Can view own Treatment request"), - ("add_own_treatmentfile", "Can add own Treatment request"), ("change_own_treatmentfile", "Can change own Treatment request"), ("delete_own_treatmentfile", "Can delete own Treatment request"), ) diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py index 935deba17..38675ecdb 100644 --- a/archaeological_finds/urls.py +++ b/archaeological_finds/urls.py @@ -42,7 +42,7 @@ urlpatterns = [ url( r"find_creation/(?P<step>.+)?$", check_permissions( - ["archaeological_finds.add_find", "archaeological_finds.add_own_find"] + ["archaeological_finds.add_find"] )(views.find_creation_wizard), name="find_creation", ), @@ -176,8 +176,7 @@ urlpatterns = [ url( r"^findbasket-add-treatmentfile/(?P<pk>[0-9-]+)/$", check_permissions( - ["archaeological_finds.add_treatmentfile", - "archaeological_finds.add_own_treatmentfile"] + ["archaeological_finds.add_treatmentfile"] )(views.findbasket_treatmentfile_add), name="findbasket-add-treatmentfile", ), |