diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-30 02:02:12 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-30 02:02:12 +0200 |
commit | dced4b8f3b540cf84f8e75041a680881b6a7e725 (patch) | |
tree | ce451400b4aa7a11b997014ac6c0117040da6667 | |
parent | 252186d3df11f79b29043a95f1cc20af63310ae1 (diff) | |
download | Ishtar-dced4b8f3b540cf84f8e75041a680881b6a7e725.tar.bz2 Ishtar-dced4b8f3b540cf84f8e75041a680881b6a7e725.zip |
Access control: fix some inconsistent settings for actions
-rw-r--r-- | archaeological_context_records/urls.py | 4 | ||||
-rw-r--r-- | archaeological_finds/ishtar_menu.py | 32 | ||||
-rw-r--r-- | archaeological_finds/urls.py | 4 | ||||
-rw-r--r-- | archaeological_operations/urls.py | 3 |
4 files changed, 22 insertions, 21 deletions
diff --git a/archaeological_context_records/urls.py b/archaeological_context_records/urls.py index 341d321f9..e89a76aef 100644 --- a/archaeological_context_records/urls.py +++ b/archaeological_context_records/urls.py @@ -23,7 +23,7 @@ from archaeological_context_records import models from ishtar_common.wizards import check_rights import views -# be carreful: each check_rights must be relevant with ishtar_menu +# be careful: each check_rights must be relevant with ishtar_menu # forms urlpatterns = patterns( @@ -33,7 +33,7 @@ urlpatterns = patterns( check_rights(['view_contextrecord', 'view_own_contextrecord'])( views.record_search_wizard), name='record_search'), url(r'record_creation/(?P<step>.+)?$', - check_rights(['add_contextrecord'])( + check_rights(['add_contextrecord', 'add_own_contextrecord'])( views.record_creation_wizard), name='record_creation'), url(r'record_modification/(?P<step>.+)?$', check_rights(['change_contextrecord', 'change_own_contextrecord'])( diff --git a/archaeological_finds/ishtar_menu.py b/archaeological_finds/ishtar_menu.py index 44a19dc02..4877e442c 100644 --- a/archaeological_finds/ishtar_menu.py +++ b/archaeological_finds/ishtar_menu.py @@ -112,23 +112,23 @@ MENU_SECTIONS = [ MenuItem('treatmentfle_search', _(u"Search"), model=models.TreatmentFile, - access_controls=['view_find', - 'view_own_find']), + access_controls=['view_treatmentfile', + 'view_own_treatmentfile']), MenuItem('treatmentfle_creation', _(u"Creation"), model=models.TreatmentFile, - access_controls=['change_find', - 'change_own_find']), + access_controls=['change_treatmentfile', + 'change_own_treatmentfile']), MenuItem('treatmentfle_modification', _(u"Modification"), model=models.TreatmentFile, - access_controls=['change_find', - 'change_own_find']), + access_controls=['change_treatmentfile', + 'change_own_treatmentfile']), MenuItem('treatmentfle_deletion', _(u"Deletion"), model=models.TreatmentFile, - access_controls=['change_find', - 'change_own_find']), + access_controls=['change_treatmentfile', + 'change_own_treatmentfile']), SectionItem( 'admin_act_fletreatments', _(u"Administrative act"), childs=[ @@ -192,23 +192,23 @@ MENU_SECTIONS = [ MenuItem('treatment_search', _(u"Search"), model=models.Treatment, - access_controls=['view_find', - 'view_own_find']), + access_controls=['view_treatment', + 'view_own_treatment']), MenuItem('treatment_creation', _(u"Creation"), model=models.Treatment, - access_controls=['change_find', - 'change_own_find']), + access_controls=['change_treatment', + 'change_own_treatment']), MenuItem('treatment_modification', _(u"Modification"), model=models.Treatment, - access_controls=['change_find', - 'change_own_find']), + access_controls=['change_treatment', + 'change_own_treatment']), MenuItem('treatment_deletion', _(u"Deletion"), model=models.Treatment, - access_controls=['change_find', - 'change_own_find']), + access_controls=['change_treatment', + 'change_own_treatment']), ]), SectionItem( 'admin_act_treatments', _(u"Administrative act"), diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py index 06d505896..9c331ccc9 100644 --- a/archaeological_finds/urls.py +++ b/archaeological_finds/urls.py @@ -24,7 +24,7 @@ import views from archaeological_finds import models -# be carreful: each check_rights must be relevant with ishtar_menu +# be careful: each check_rights must be relevant with ishtar_menu # forms urlpatterns = patterns( @@ -33,7 +33,7 @@ urlpatterns = patterns( check_rights(['view_find', 'view_own_find'])( views.find_search_wizard), name='find_search'), url(r'find_creation/(?P<step>.+)?$', - check_rights(['add_find'])( + check_rights(['add_find', 'add_own_find'])( views.find_creation_wizard), name='find_creation'), url(r'find_modification/(?P<step>.+)?$', check_rights(['change_find', 'change_own_find'])( diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py index e98ddc93f..bc6bc4bee 100644 --- a/archaeological_operations/urls.py +++ b/archaeological_operations/urls.py @@ -69,7 +69,8 @@ urlpatterns = patterns( check_rights(['view_operation', 'view_own_operation'])( views.operation_search_wizard), name='operation_search'), url(r'operation_creation/(?P<step>.+)?$', - check_rights(['add_operation'])(views.operation_creation_wizard), + check_rights(['add_operation', 'add_own_operation'])( + views.operation_creation_wizard), name='operation_creation'), url(r'operation_add/(?P<file_id>\d+)$', views.operation_add, name='operation_add'), |