summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md1
-rw-r--r--archaeological_finds/urls.py8
-rw-r--r--ishtar_common/wizards.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 623b4710f..94cd88823 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -22,6 +22,7 @@ Ishtar changelog
- Importer export: fix pre_importer call
- Image detail: do not display Modify link when not relevant (refs #5438)
- Fix french label for geo types (refs #5577)
+- Fix permissions for treatments requests (refs #5441)
v4.0.43 - 2023-03-17
--------------------
diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py
index fd98667d5..06cc504ec 100644
--- a/archaeological_finds/urls.py
+++ b/archaeological_finds/urls.py
@@ -277,7 +277,7 @@ urlpatterns = [
),
url(
r"^treatment_deletion/(?P<step>.+)?$",
- check_rights(["change_find", "change_own_find"])(
+ check_rights(["change_treatmentfile", "change_own_treatmentfile"])(
views.treatment_deletion_wizard
),
name="treatment_deletion",
@@ -370,21 +370,21 @@ urlpatterns = [
),
url(
r"^treatmentfle_search/(?P<step>.+)?$",
- check_rights(["change_find", "change_own_find"])(
+ check_rights(["view_treatmentfile", "view_own_treatmentfile"])(
views.treatmentfile_search_wizard
),
name="treatmentfile_search",
),
url(
r"treatmentfle_creation/(?P<step>.+)?$",
- check_rights(["change_find", "change_own_find"])(
+ check_rights(["change_treatmentfile", "change_own_treatmentfile"])(
views.treatmentfile_creation_wizard
),
name="treatmentfile_creation",
),
url(
r"treatmentfle_modification/(?P<step>.+)?$",
- check_rights(["change_find", "change_own_find"])(
+ check_rights(["change_treatmentfile", "change_own_treatmentfile"])(
views.treatmentfile_modification_wizard
),
name="treatmentfile_modification",
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 72cd4db45..030bb4af2 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -2078,7 +2078,7 @@ class AccountWizard(Wizard):
profile.profile_type = profile_type
profile.save()
else:
- profile = models.UserProfile.objects.create(
+ profile, __ = models.UserProfile.objects.get_or_create(
profile_type=profile_type, person=person, name=name
)
area_pks = data.get("area", None)