diff options
Diffstat (limited to 'archaeological_context_records/urls.py')
-rw-r--r-- | archaeological_context_records/urls.py | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py index 2b95db086..338f5bb2a 100644 --- a/archaeological_context_records/urls.py +++ b/archaeological_context_records/urls.py @@ -20,38 +20,42 @@ from django.conf.urls import url from django.urls import path -from ishtar_common.utils import check_rights +from ishtar_common.utils import check_permissions from archaeological_context_records import models, views, views_api -# be careful: each check_rights must be relevant with ishtar_menu +# be careful: each check_permissions must be relevant with ishtar_menu # forms urlpatterns = [ # Context records url( r"record_search/(?P<step>.+)?$", - check_rights(["view_contextrecord", "view_own_contextrecord"])( + check_permissions(["archaeological_context_records.view_contextrecord", + "archaeological_context_records.view_own_contextrecord"])( views.record_search_wizard ), name="record_search", ), url( r"contextrecord_search/(?P<step>.+)?$", - check_rights(["view_contextrecord", "view_own_contextrecord"])( + check_permissions(["archaeological_context_records.view_contextrecord", + "archaeological_context_records.view_own_contextrecord"])( views.record_search_wizard ), name="contextrecord_search", ), url( r"record_creation/(?P<step>.+)?$", - check_rights(["add_contextrecord", "add_own_contextrecord"])( + check_permissions(["archaeological_context_records.add_contextrecord", + "archaeological_context_records.add_own_contextrecord"])( views.record_creation_wizard ), name="record_creation", ), url( r"record_modification/(?P<step>.+)?$", - check_rights(["change_contextrecord", "change_own_contextrecord"])( + check_permissions(["archaeological_context_records.change_contextrecord", + "archaeological_context_records.change_own_contextrecord"])( views.record_modification_wizard ), name="record_modification", @@ -59,7 +63,8 @@ urlpatterns = [ url(r"record_modify/(?P<pk>.+)/$", views.record_modify, name="record_modify"), url( r"record_deletion/(?P<step>.+)?$", - check_rights(["change_contextrecord", "change_own_contextrecord"])( + check_permissions(["archaeological_context_records.change_contextrecord", + "archaeological_context_records.change_own_contextrecord"])( views.record_deletion_wizard ), name="record_deletion", @@ -151,14 +156,16 @@ urlpatterns = [ ), url( r"^context-record-relations-modify/(?P<pk>.+)/$", - check_rights(["change_contextrecord", "change_own_contextrecord"])( + check_permissions(["archaeological_context_records.change_contextrecord", + "archaeological_context_records.change_own_contextrecord"])( views.context_record_modify_relations ), name="context-record-relation-modify", ), url( r"^operation-qa-contextrecord/(?P<pks>[0-9]+)/$", - check_rights(["add_contextrecord", "add_own_contextrecord"])( + check_permissions(["archaeological_context_records.add_contextrecord", + "archaeological_context_records.add_own_contextrecord"])( views.QAOperationContextRecordView.as_view() ), name="operation-qa-contextrecord", @@ -171,21 +178,24 @@ urlpatterns = [ ), url( r"^contextrecord-qa-duplicate/(?P<pks>[0-9-]+)?/$", - check_rights(["change_contextrecord", "change_own_contextrecord"])( + check_permissions(["archaeological_context_records.change_contextrecord", + "archaeological_context_records.change_own_contextrecord"])( views.QAContextRecordDuplicateFormView.as_view() ), name="contextrecord-qa-duplicate", ), url( r"^contextrecord-qa-bulk-update/(?P<pks>[0-9-]+)?/$", - check_rights(["change_contextrecord", "change_own_contextrecord"])( + check_permissions(["archaeological_context_records.change_contextrecord", + "archaeological_context_records.change_own_contextrecord"])( views.QAContextRecordForm.as_view() ), name="contextrecord-qa-bulk-update", ), url( r"^contextrecord-qa-bulk-update/(?P<pks>[0-9-]+)?/confirm/$", - check_rights(["change_contextrecord", "change_own_contextrecord"])( + check_permissions(["archaeological_context_records.change_contextrecord", + "archaeological_context_records.change_own_contextrecord"])( views.QAContextRecordForm.as_view() ), name="contextrecord-qa-bulk-update-confirm", |