diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-04-06 15:24:09 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-04-17 15:47:16 +0200 |
commit | 5b04cd656e01969646f3398ee89a1b3bb550cb54 (patch) | |
tree | fa1149d50507b393cd97382076fdd62dd38b8bec | |
parent | 28ab27ae3f641f6f362b98e61aa3f247bb4e3006 (diff) | |
download | Ishtar-5b04cd656e01969646f3398ee89a1b3bb550cb54.tar.bz2 Ishtar-5b04cd656e01969646f3398ee89a1b3bb550cb54.zip |
Fix permissions for treatments requests (refs #5441)
-rw-r--r-- | CHANGES.md | 1 | ||||
-rw-r--r-- | archaeological_finds/urls.py | 8 | ||||
-rw-r--r-- | ishtar_common/wizards.py | 2 |
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) |