summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-16 12:27:34 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-16 12:27:34 +0200
commit8d9998014f3d7591f073dea645e3eee40b4917e6 (patch)
tree6bb5b6aa22d1720b8eb2dc26766dcad9dda1544d /ishtar_common
parentdfd6fd2551a9cc54e6b69d4f5d4d4aa328b9cc7a (diff)
parenta25d54c314692843a0086f6c7f9d38c30affce40 (diff)
downloadIshtar-8d9998014f3d7591f073dea645e3eee40b4917e6.tar.bz2
Ishtar-8d9998014f3d7591f073dea645e3eee40b4917e6.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/fixtures/ishtar-access-control.json1
-rw-r--r--ishtar_common/forms.py2
-rw-r--r--ishtar_common/locale/django.pot634
-rw-r--r--ishtar_common/management/commands/export_access_controls.py89
-rw-r--r--ishtar_common/management/commands/import_access_controls.py106
-rw-r--r--ishtar_common/migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py496
-rw-r--r--ishtar_common/models.py47
-rw-r--r--ishtar_common/static/media/style.css4
-rw-r--r--ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html2
-rw-r--r--ishtar_common/tests.py11
-rw-r--r--ishtar_common/views.py68
11 files changed, 1109 insertions, 351 deletions
diff --git a/ishtar_common/fixtures/ishtar-access-control.json b/ishtar_common/fixtures/ishtar-access-control.json
new file mode 100644
index 000000000..c44418f07
--- /dev/null
+++ b/ishtar_common/fixtures/ishtar-access-control.json
@@ -0,0 +1 @@
+{"content_types": [{"model": "activitytype", "name": "Activity Type", "app_label": "archaeological_context_records"}, {"model": "acttype", "name": "Act type", "app_label": "archaeological_operations"}, {"model": "administrativeact", "name": "Administrative act", "app_label": "archaeological_operations"}, {"model": "file", "name": "Archaeological file", "app_label": "archaeological_files"}, {"model": "filetype", "name": "Archaeological file type", "app_label": "archaeological_files"}, {"model": "archaeologicalsite", "name": "Archaeological site", "app_label": "archaeological_operations"}, {"model": "arrondissement", "name": "arrondissement", "app_label": "ishtar_common"}, {"model": "author", "name": "Author", "app_label": "ishtar_common"}, {"model": "authortype", "name": "Author type", "app_label": "ishtar_common"}, {"model": "basefind", "name": "Base find", "app_label": "archaeological_finds"}, {"model": "batchtype", "name": "Batch type", "app_label": "archaeological_finds"}, {"model": "canton", "name": "canton", "app_label": "ishtar_common"}, {"model": "collection", "name": "Collection", "app_label": "archaeological_warehouse"}, {"model": "conservatorystate", "name": "Conservatory state", "app_label": "archaeological_finds"}, {"model": "container", "name": "Container", "app_label": "archaeological_warehouse"}, {"model": "containerlocalisation", "name": "Container localisation", "app_label": "archaeological_warehouse"}, {"model": "containertype", "name": "Container type", "app_label": "archaeological_warehouse"}, {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}, {"model": "contextrecord", "name": "Context Record", "app_label": "archaeological_context_records"}, {"model": "contextrecordsource", "name": "Context record documentation", "app_label": "archaeological_context_records"}, {"model": "dating", "name": "Dating", "app_label": "archaeological_context_records"}, {"model": "datingquality", "name": "Dating quality", "app_label": "archaeological_context_records"}, {"model": "datingtype", "name": "Dating type", "app_label": "archaeological_context_records"}, {"model": "department", "name": "Department", "app_label": "ishtar_common"}, {"model": "documentationtype", "name": "Documentation type", "app_label": "archaeological_context_records"}, {"model": "documenttemplate", "name": "Document template", "app_label": "ishtar_common"}, {"model": "excavationtechnictype", "name": "Excavation technic type", "app_label": "archaeological_context_records"}, {"model": "filebydepartment", "name": "file by department", "app_label": "archaeological_files"}, {"model": "find", "name": "Find", "app_label": "archaeological_finds"}, {"model": "findbasket", "name": "find basket", "app_label": "archaeological_finds"}, {"model": "findsource", "name": "Find documentation", "app_label": "archaeological_finds"}, {"model": "finddownstreamtreatments", "name": "find downstream treatments", "app_label": "archaeological_finds"}, {"model": "findtreatments", "name": "find treatments", "app_label": "archaeological_finds"}, {"model": "findupstreamtreatments", "name": "find upstream treatments", "app_label": "archaeological_finds"}, {"model": "format", "name": "Format", "app_label": "ishtar_common"}, {"model": "globalvar", "name": "Global variable", "app_label": "ishtar_common"}, {"model": "group", "name": "group", "app_label": "auth"}, {"model": "historicaladministrativeact", "name": "historical administrative act", "app_label": "archaeological_operations"}, {"model": "historicalbasefind", "name": "historical base find", "app_label": "archaeological_finds"}, {"model": "historicalcontextrecord", "name": "historical context record", "app_label": "archaeological_context_records"}, {"model": "historicalfile", "name": "historical file", "app_label": "archaeological_files"}, {"model": "historicalfind", "name": "historical find", "app_label": "archaeological_finds"}, {"model": "historicaloperation", "name": "historical operation", "app_label": "archaeological_operations"}, {"model": "historicalorganization", "name": "historical organization", "app_label": "ishtar_common"}, {"model": "historicalperson", "name": "historical person", "app_label": "ishtar_common"}, {"model": "historicaltreatment", "name": "historical treatment", "app_label": "archaeological_finds"}, {"model": "historicaltreatmentfile", "name": "historical treatment file", "app_label": "archaeological_finds"}, {"model": "identificationtype", "name": "Identification Type", "app_label": "archaeological_context_records"}, {"model": "import", "name": "Import", "app_label": "ishtar_common"}, {"model": "importercolumn", "name": "Importer - Column", "app_label": "ishtar_common"}, {"model": "importerdefault", "name": "Importer - Default", "app_label": "ishtar_common"}, {"model": "importerdefaultvalues", "name": "Importer - Default value", "app_label": "ishtar_common"}, {"model": "importerduplicatefield", "name": "Importer - Duplicate field", "app_label": "ishtar_common"}, {"model": "formatertype", "name": "Importer - Formater type", "app_label": "ishtar_common"}, {"model": "importermodel", "name": "Importer - Model", "app_label": "ishtar_common"}, {"model": "regexp", "name": "Importer - Regular expression", "app_label": "ishtar_common"}, {"model": "importtarget", "name": "Importer - Target", "app_label": "ishtar_common"}, {"model": "targetkey", "name": "Importer - Target key", "app_label": "ishtar_common"}, {"model": "importertype", "name": "Importer - Type", "app_label": "ishtar_common"}, {"model": "integritytype", "name": "Integrity type", "app_label": "archaeological_finds"}, {"model": "ishtarsiteprofile", "name": "Ishtar site profile", "app_label": "ishtar_common"}, {"model": "ishtaruser", "name": "Ishtar user", "app_label": "ishtar_common"}, {"model": "itemkey", "name": "item key", "app_label": "ishtar_common"}, {"model": "logentry", "name": "log entry", "app_label": "admin"}, {"model": "materialtype", "name": "Material type", "app_label": "archaeological_finds"}, {"model": "migrationhistory", "name": "migration history", "app_label": "south"}, {"model": "objecttype", "name": "Object type", "app_label": "archaeological_finds"}, {"model": "operation", "name": "Operation", "app_label": "archaeological_operations"}, {"model": "operationbydepartment", "name": "operation by department", "app_label": "archaeological_operations"}, {"model": "operationsource", "name": "Operation documentation", "app_label": "archaeological_operations"}, {"model": "recordrelations", "name": "Operation record relation", "app_label": "archaeological_operations"}, {"model": "relationtype", "name": "Operation relation type", "app_label": "archaeological_operations"}, {"model": "operationtype", "name": "Operation type", "app_label": "ishtar_common"}, {"model": "operationtypeold", "name": "Operation type old", "app_label": "archaeological_operations"}, {"model": "organization", "name": "Organization", "app_label": "ishtar_common"}, {"model": "organizationtype", "name": "Organization type", "app_label": "ishtar_common"}, {"model": "parcel", "name": "Parcel", "app_label": "archaeological_operations"}, {"model": "parcelowner", "name": "Parcel owner", "app_label": "archaeological_operations"}, {"model": "permission", "name": "permission", "app_label": "auth"}, {"model": "permittype", "name": "Permit type", "app_label": "archaeological_files"}, {"model": "person", "name": "Person", "app_label": "ishtar_common"}, {"model": "persontype", "name": "Person type", "app_label": "ishtar_common"}, {"model": "preservationtype", "name": "Preservation type", "app_label": "archaeological_finds"}, {"model": "property", "name": "Property", "app_label": "archaeological_finds"}, {"model": "recordrelations", "name": "Record relation", "app_label": "archaeological_context_records"}, {"model": "recordrelationview", "name": "record relation view", "app_label": "archaeological_context_records"}, {"model": "registrationprofile", "name": "registration profile", "app_label": "registration"}, {"model": "relationtype", "name": "Relation type", "app_label": "archaeological_context_records"}, {"model": "remaintype", "name": "Remain type", "app_label": "archaeological_operations"}, {"model": "remarkabilitytype", "name": "Remarkability type", "app_label": "archaeological_finds"}, {"model": "reportstate", "name": "Report state", "app_label": "archaeological_operations"}, {"model": "session", "name": "session", "app_label": "sessions"}, {"model": "site", "name": "site", "app_label": "sites"}, {"model": "sourcetype", "name": "Source type", "app_label": "ishtar_common"}, {"model": "spatialreferencesystem", "name": "Spatial reference system", "app_label": "ishtar_common"}, {"model": "state", "name": "State", "app_label": "ishtar_common"}, {"model": "supporttype", "name": "Support type", "app_label": "ishtar_common"}, {"model": "titletype", "name": "Title type", "app_label": "ishtar_common"}, {"model": "town", "name": "Town", "app_label": "ishtar_common"}, {"model": "treatment", "name": "Treatment", "app_label": "archaeological_finds"}, {"model": "treatmentsource", "name": "Treatment documentation", "app_label": "archaeological_finds"}, {"model": "treatmentfile", "name": "Treatment file", "app_label": "archaeological_finds"}, {"model": "treatmentfilesource", "name": "Treatment file documentation", "app_label": "archaeological_finds"}, {"model": "treatmentfiletype", "name": "Treatment file type", "app_label": "archaeological_finds"}, {"model": "treatmenttype", "name": "Treatment type", "app_label": "archaeological_finds"}, {"model": "treatmentstate", "name": "Type of treatment state", "app_label": "archaeological_finds"}, {"model": "period", "name": "Type Period", "app_label": "archaeological_operations"}, {"model": "saisinetype", "name": "Type Saisine", "app_label": "archaeological_files"}, {"model": "unit", "name": "Unit Type", "app_label": "archaeological_context_records"}, {"model": "user", "name": "user", "app_label": "auth"}, {"model": "warehouse", "name": "Warehouse", "app_label": "archaeological_warehouse"}, {"model": "warehousedivision", "name": "Warehouse division", "app_label": "archaeological_warehouse"}, {"model": "warehousedivisionlink", "name": "warehouse division link", "app_label": "archaeological_warehouse"}, {"model": "warehousetype", "name": "Warehouse type", "app_label": "archaeological_warehouse"}], "person_types": [{"comment": "Un acc\u00e8s limit\u00e9 \u00e0 la base, uniquement en lecture. Apr\u00e8s enregistrement.", "available": true, "txt_idx": "reader_access", "label": "Acc\u00e8s en lecture"}, {"comment": "", "available": true, "txt_idx": "administrator", "label": "Administrateur"}, {"comment": "Responsable de l'am\u00e9nagement (pr\u00e9ventif).", "available": true, "txt_idx": "general_contractor", "label": "Am\u00e9nageur"}, {"comment": "", "available": true, "txt_idx": "responsible_planning_service", "label": "Chef de service instructeur"}, {"comment": "Peut intervenir sur les donn\u00e9es d'une op\u00e9ration sans en \u00eatre responsable.", "available": true, "txt_idx": "collaborator", "label": "Collaborateur scientifique"}, {"comment": "Personne demandant une action sur le mobilier (traitements).", "available": true, "txt_idx": "applicant", "label": "Demandeur"}, {"comment": "Peut g\u00e9rer du mobilier qu'il n'a pas cr\u00e9\u00e9.\r\n\r\n", "available": true, "txt_idx": "warehouse_manager", "label": "Gestionnaire de d\u00e9p\u00f4t"}, {"comment": "", "available": true, "txt_idx": "sra_agent", "label": "Responsable de suivi scientifique"}, {"comment": "Responsable d'op\u00e9ration arch\u00e9ologique.", "available": true, "txt_idx": "head_scientist", "label": "Responsable scientifique"}, {"comment": "Peut utiliser toutes les fonctionnalit\u00e9s du module Administratif.", "available": true, "txt_idx": "secretarial_dept", "label": "Secr\u00e9tariat"}], "groups": [{"name": "Documents de demande de traitement : lecture"}, {"name": "Actes administratifs : modification/suppression"}, {"name": "Op\u00e9rations : cl\u00f4ture"}, {"name": "Dossiers : cl\u00f4ture"}, {"name": "D\u00e9p\u00f4ts : ajout"}, {"name": "D\u00e9p\u00f4ts : modification/suppression"}, {"name": "Actes administratifs rattach\u00e9s : lecture"}, {"name": "Demandes de traitement rattach\u00e9es : ajout"}, {"name": "Documents op\u00e9ration : ajout"}, {"name": "Documents op\u00e9ration : modification/suppression"}, {"name": "Demandes de traitement rattach\u00e9es : lecture"}, {"name": "Dossiers : ajout"}, {"name": "Documents de demande de traitement : ajout"}, {"name": "Dossiers : modification/suppression"}, {"name": "Demandes de traitement rattach\u00e9es : modification/suppression"}, {"name": "Mobilier : ajout"}, {"name": "Mobilier : modification/suppression"}, {"name": "Organisations rattach\u00e9es : lecture"}, {"name": "Op\u00e9rations : ajout"}, {"name": "Documents de demande de traitement : modification/suppression"}, {"name": "Op\u00e9rations : modification/suppression"}, {"name": "Organisations rattach\u00e9es : ajout"}, {"name": "Organisations : ajout"}, {"name": "Organisations : modification/suppression"}, {"name": "Organisations rattach\u00e9es : modification/suppression"}, {"name": "Traitements : ajout"}, {"name": "Traitements : modification/suppression"}, {"name": "Actes administratifs : ajout"}, {"name": "Documents UE : lecture"}, {"name": "Documents UE rattach\u00e9s : lecture"}, {"name": "Documents UE : ajout"}, {"name": "Actes administratifs : lecture"}, {"name": "Auteurs : lecture"}, {"name": "Personnes : ajout"}, {"name": "Personnes : modification/suppression"}, {"name": "Actes administratifs rattach\u00e9s : ajout"}, {"name": "Actes administratifs rattach\u00e9s : modification/suppression"}, {"name": "D\u00e9p\u00f4ts rattach\u00e9s : ajout"}, {"name": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression"}, {"name": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"name": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"name": "Dossiers rattach\u00e9s : ajout"}, {"name": "Dossiers rattach\u00e9s : modification/suppression"}, {"name": "Traitements rattach\u00e9s : ajout"}, {"name": "Traitements rattach\u00e9s : modification/suppression"}, {"name": "Demandes de traitement : ajout"}, {"name": "Demandes de traitement : lecture"}, {"name": "Demandes de traitement : modification/suppression"}, {"name": "Auteurs : ajout"}, {"name": "Auteurs : modification/suppression"}, {"name": "D\u00e9p\u00f4ts rattach\u00e9s : lecture"}, {"name": "D\u00e9p\u00f4ts : lecture"}, {"name": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"name": "Documents op\u00e9ration : lecture"}, {"name": "Dossiers rattach\u00e9s : lecture"}, {"name": "Dossiers : lecture"}, {"name": "Mobilier : lecture"}, {"name": "Op\u00e9rations : lecture"}, {"name": "Organisations : lecture"}, {"name": "Personnes : lecture"}, {"name": "Traitements rattach\u00e9s : lecture"}, {"name": "Traitements : lecture"}, {"name": "UE : lecture"}, {"name": "UE : ajout"}, {"name": "UE : modification/suppression"}, {"name": "UE rattach\u00e9es : ajout"}, {"name": "UE rattach\u00e9es : lecture"}, {"name": "UE rattach\u00e9es : modification/suppression"}, {"name": "Personnes rattach\u00e9es : ajout"}, {"name": "Personnes rattach\u00e9es : lecture"}, {"name": "Personnes rattach\u00e9es : modification/suppression"}, {"name": "Op\u00e9rations rattach\u00e9es : ajout"}, {"name": "Op\u00e9rations rattach\u00e9es : lecture"}, {"name": "Op\u00e9rations rattach\u00e9es : modification/suppression"}, {"name": "Mobilier rattach\u00e9 : ajout"}, {"name": "Mobilier rattach\u00e9 : lecture"}, {"name": "Mobilier rattach\u00e9 : modification/suppression"}, {"name": "Documents UE rattach\u00e9s : modification/suppression"}, {"name": "Documents UE : modification/suppression"}, {"name": "Documents UE rattach\u00e9s : ajout"}, {"name": "Documents mobilier : lecture"}, {"name": "Documents mobilier : ajout"}, {"name": "Documents mobilier : modification/suppression"}, {"name": "Documents mobilier rattach\u00e9s : ajout"}, {"name": "Documents mobilier rattach\u00e9s : lecture"}, {"name": "Documents mobilier rattach\u00e9s : modification/suppression"}, {"name": "Documents de traitement : lecture"}, {"name": "Documents de traitement : ajout"}, {"name": "Documents de traitement : modification/suppression"}, {"name": "Documents de traitement rattach\u00e9s : lecture"}, {"name": "Documents de traitement rattach\u00e9s : ajout"}, {"name": "Documents de traitement rattach\u00e9s : modification/suppression"}, {"name": "Documents de demande de traitement rattach\u00e9s : lecture"}, {"name": "Documents de demande de traitement rattach\u00e9s : ajout"}, {"name": "Documents de demande de traitement rattach\u00e9s : modification/suppression"}], "group_perms": [{"group": "Documents de demande de traitement : lecture", "permission": "view_filetreatmentsource"}, {"group": "Actes administratifs : modification/suppression", "permission": "change_administrativeact"}, {"group": "Actes administratifs : modification/suppression", "permission": "delete_administrativeact"}, {"group": "Op\u00e9rations : cl\u00f4ture", "permission": "close_operation"}, {"group": "Dossiers : cl\u00f4ture", "permission": "close_file"}, {"group": "D\u00e9p\u00f4ts : ajout", "permission": "add_warehouse"}, {"group": "D\u00e9p\u00f4ts : modification/suppression", "permission": "change_warehouse"}, {"group": "D\u00e9p\u00f4ts : modification/suppression", "permission": "delete_warehouse"}, {"group": "Actes administratifs rattach\u00e9s : lecture", "permission": "view_own_administrativeact"}, {"group": "Demandes de traitement rattach\u00e9es : ajout", "permission": "add_own_filetreatment"}, {"group": "Documents op\u00e9ration : ajout", "permission": "add_operation"}, {"group": "Documents op\u00e9ration : modification/suppression", "permission": "change_operation"}, {"group": "Documents op\u00e9ration : modification/suppression", "permission": "delete_operation"}, {"group": "Demandes de traitement rattach\u00e9es : lecture", "permission": "view_own_filetreatment"}, {"group": "Dossiers : ajout", "permission": "add_file"}, {"group": "Documents de demande de traitement : ajout", "permission": "add_treatmentfilesource"}, {"group": "Dossiers : modification/suppression", "permission": "change_file"}, {"group": "Dossiers : modification/suppression", "permission": "delete_file"}, {"group": "Demandes de traitement rattach\u00e9es : modification/suppression", "permission": "change_own_filetreatment"}, {"group": "Demandes de traitement rattach\u00e9es : modification/suppression", "permission": "delete_own_filetreatment"}, {"group": "Mobilier : ajout", "permission": "add_basefind"}, {"group": "Mobilier : ajout", "permission": "add_find"}, {"group": "Mobilier : modification/suppression", "permission": "change_basefind"}, {"group": "Mobilier : modification/suppression", "permission": "delete_basefind"}, {"group": "Mobilier : modification/suppression", "permission": "change_find"}, {"group": "Mobilier : modification/suppression", "permission": "delete_find"}, {"group": "Organisations rattach\u00e9es : lecture", "permission": "view_own_organization"}, {"group": "Op\u00e9rations : ajout", "permission": "add_operation"}, {"group": "Documents de demande de traitement : modification/suppression", "permission": "change_treatmentfilesource"}, {"group": "Documents de demande de traitement : modification/suppression", "permission": "delete_treatmentfilesource"}, {"group": "Op\u00e9rations : modification/suppression", "permission": "change_operation"}, {"group": "Op\u00e9rations : modification/suppression", "permission": "delete_operation"}, {"group": "Organisations rattach\u00e9es : ajout", "permission": "add_own_organization"}, {"group": "Organisations : ajout", "permission": "add_organization"}, {"group": "Organisations : modification/suppression", "permission": "change_organization"}, {"group": "Organisations : modification/suppression", "permission": "delete_organization"}, {"group": "Organisations rattach\u00e9es : modification/suppression", "permission": "change_own_organization"}, {"group": "Organisations rattach\u00e9es : modification/suppression", "permission": "delete_own_organization"}, {"group": "Traitements : ajout", "permission": "add_treatment"}, {"group": "Traitements : modification/suppression", "permission": "change_treatment"}, {"group": "Traitements : modification/suppression", "permission": "delete_treatment"}, {"group": "Actes administratifs : ajout", "permission": "add_administrativeact"}, {"group": "Documents UE : lecture", "permission": "view_contextrecordsource"}, {"group": "Documents UE rattach\u00e9s : lecture", "permission": "view_own_contextrecordsource"}, {"group": "Documents UE : ajout", "permission": "add_contextrecordsource"}, {"group": "Actes administratifs : lecture", "permission": "view_administrativeact"}, {"group": "Auteurs : lecture", "permission": "view_author"}, {"group": "Personnes : ajout", "permission": "add_person"}, {"group": "Personnes : modification/suppression", "permission": "change_person"}, {"group": "Personnes : modification/suppression", "permission": "delete_person"}, {"group": "Actes administratifs rattach\u00e9s : ajout", "permission": "add_own_administrativeact"}, {"group": "Actes administratifs rattach\u00e9s : modification/suppression", "permission": "change_own_administrativeact"}, {"group": "Actes administratifs rattach\u00e9s : modification/suppression", "permission": "delete_own_administrativeact"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : ajout", "permission": "add_own_warehouse"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression", "permission": "change_own_warehouse"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression", "permission": "delete_own_warehouse"}, {"group": "Documents op\u00e9ration rattach\u00e9s : ajout", "permission": "add_own_operation"}, {"group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression", "permission": "change_own_operation"}, {"group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression", "permission": "delete_own_operation"}, {"group": "Dossiers rattach\u00e9s : ajout", "permission": "add_own_file"}, {"group": "Dossiers rattach\u00e9s : modification/suppression", "permission": "change_own_file"}, {"group": "Dossiers rattach\u00e9s : modification/suppression", "permission": "delete_own_file"}, {"group": "Traitements rattach\u00e9s : ajout", "permission": "add_own_treatment"}, {"group": "Traitements rattach\u00e9s : modification/suppression", "permission": "change_own_treatment"}, {"group": "Traitements rattach\u00e9s : modification/suppression", "permission": "delete_own_treatment"}, {"group": "Demandes de traitement : ajout", "permission": "add_filetreatment"}, {"group": "Demandes de traitement : lecture", "permission": "view_filetreatment"}, {"group": "Demandes de traitement : modification/suppression", "permission": "change_filetreatment"}, {"group": "Demandes de traitement : modification/suppression", "permission": "delete_filetreatment"}, {"group": "Auteurs : ajout", "permission": "add_author"}, {"group": "Auteurs : modification/suppression", "permission": "change_author"}, {"group": "Auteurs : modification/suppression", "permission": "delete_author"}, {"group": "D\u00e9p\u00f4ts rattach\u00e9s : lecture", "permission": "view_own_warehouse"}, {"group": "D\u00e9p\u00f4ts : lecture", "permission": "view_warehouse"}, {"group": "Documents op\u00e9ration rattach\u00e9s : lecture", "permission": "view_own_operationsource"}, {"group": "Documents op\u00e9ration : lecture", "permission": "view_operationsource"}, {"group": "Dossiers rattach\u00e9s : lecture", "permission": "view_own_file"}, {"group": "Dossiers : lecture", "permission": "view_file"}, {"group": "Mobilier : lecture", "permission": "view_basefind"}, {"group": "Mobilier : lecture", "permission": "view_find"}, {"group": "Op\u00e9rations : lecture", "permission": "view_operation"}, {"group": "Organisations : lecture", "permission": "view_organization"}, {"group": "Personnes : lecture", "permission": "view_person"}, {"group": "Traitements rattach\u00e9s : lecture", "permission": "view_own_treatment"}, {"group": "Traitements : lecture", "permission": "view_treatment"}, {"group": "UE : lecture", "permission": "view_contextrecord"}, {"group": "UE : ajout", "permission": "add_contextrecord"}, {"group": "UE : modification/suppression", "permission": "change_contextrecord"}, {"group": "UE : modification/suppression", "permission": "delete_contextrecord"}, {"group": "UE rattach\u00e9es : ajout", "permission": "add_own_contextrecord"}, {"group": "UE rattach\u00e9es : lecture", "permission": "view_own_contextrecord"}, {"group": "UE rattach\u00e9es : modification/suppression", "permission": "change_own_contextrecord"}, {"group": "UE rattach\u00e9es : modification/suppression", "permission": "delete_own_contextrecord"}, {"group": "Personnes rattach\u00e9es : ajout", "permission": "add_own_person"}, {"group": "Personnes rattach\u00e9es : lecture", "permission": "view_own_person"}, {"group": "Personnes rattach\u00e9es : modification/suppression", "permission": "change_own_person"}, {"group": "Personnes rattach\u00e9es : modification/suppression", "permission": "delete_own_person"}, {"group": "Op\u00e9rations rattach\u00e9es : ajout", "permission": "add_own_operation"}, {"group": "Op\u00e9rations rattach\u00e9es : lecture", "permission": "view_own_operation"}, {"group": "Op\u00e9rations rattach\u00e9es : modification/suppression", "permission": "change_own_operation"}, {"group": "Op\u00e9rations rattach\u00e9es : modification/suppression", "permission": "delete_own_operation"}, {"group": "Mobilier rattach\u00e9 : ajout", "permission": "add_own_basefind"}, {"group": "Mobilier rattach\u00e9 : ajout", "permission": "add_own_find"}, {"group": "Mobilier rattach\u00e9 : lecture", "permission": "view_own_basefind"}, {"group": "Mobilier rattach\u00e9 : lecture", "permission": "view_own_find"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "change_own_basefind"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "delete_own_basefind"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "change_own_find"}, {"group": "Mobilier rattach\u00e9 : modification/suppression", "permission": "delete_own_find"}, {"group": "Documents UE rattach\u00e9s : modification/suppression", "permission": "change_own_contextrecordsource"}, {"group": "Documents UE rattach\u00e9s : modification/suppression", "permission": "delete_own_contextrecordsource"}, {"group": "Documents UE : modification/suppression", "permission": "change_contextrecordsource"}, {"group": "Documents UE : modification/suppression", "permission": "delete_contextrecordsource"}, {"group": "Documents UE rattach\u00e9s : ajout", "permission": "add_own_contextrecordsource"}, {"group": "Documents mobilier : lecture", "permission": "view_findsource"}, {"group": "Documents mobilier : ajout", "permission": "add_findsource"}, {"group": "Documents mobilier : modification/suppression", "permission": "change_findsource"}, {"group": "Documents mobilier : modification/suppression", "permission": "delete_findsource"}, {"group": "Documents mobilier rattach\u00e9s : ajout", "permission": "add_own_findsource"}, {"group": "Documents mobilier rattach\u00e9s : lecture", "permission": "view_own_findsource"}, {"group": "Documents mobilier rattach\u00e9s : modification/suppression", "permission": "change_own_findsource"}, {"group": "Documents mobilier rattach\u00e9s : modification/suppression", "permission": "delete_own_findsource"}, {"group": "Documents de traitement : lecture", "permission": "view_treatmentsource"}, {"group": "Documents de traitement : ajout", "permission": "add_treatmentsource"}, {"group": "Documents de traitement : modification/suppression", "permission": "change_treatmentsource"}, {"group": "Documents de traitement : modification/suppression", "permission": "delete_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : lecture", "permission": "view_own_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : ajout", "permission": "add_own_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : modification/suppression", "permission": "change_own_treatmentsource"}, {"group": "Documents de traitement rattach\u00e9s : modification/suppression", "permission": "delete_own_treatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : lecture", "permission": "view_own_filetreatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : ajout", "permission": "add_own_filetreatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : modification/suppression", "permission": "change_own_filetreatmentsource"}, {"group": "Documents de demande de traitement rattach\u00e9s : modification/suppression", "permission": "delete_own_filetreatmentsource"}], "person_type_groups": [{"person_type": "reader_access", "group": "Actes administratifs : lecture"}, {"person_type": "reader_access", "group": "Demandes de traitement : lecture"}, {"person_type": "reader_access", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "reader_access", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "reader_access", "group": "Dossiers : lecture"}, {"person_type": "reader_access", "group": "Mobilier : lecture"}, {"person_type": "reader_access", "group": "Op\u00e9rations : lecture"}, {"person_type": "reader_access", "group": "Organisations : lecture"}, {"person_type": "reader_access", "group": "Personnes : lecture"}, {"person_type": "reader_access", "group": "Traitements : lecture"}, {"person_type": "reader_access", "group": "UE : lecture"}, {"person_type": "administrator", "group": "Op\u00e9rations : lecture"}, {"person_type": "administrator", "group": "Dossiers : lecture"}, {"person_type": "administrator", "group": "UE : lecture"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "administrator", "group": "Mobilier : lecture"}, {"person_type": "administrator", "group": "Traitements : lecture"}, {"person_type": "administrator", "group": "Actes administratifs : lecture"}, {"person_type": "administrator", "group": "Actes administratifs : ajout"}, {"person_type": "administrator", "group": "Actes administratifs : modification/suppression"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts : ajout"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts : modification/suppression"}, {"person_type": "administrator", "group": "Dossiers : ajout"}, {"person_type": "administrator", "group": "Dossiers : modification/suppression"}, {"person_type": "administrator", "group": "Mobilier : ajout"}, {"person_type": "administrator", "group": "Mobilier : modification/suppression"}, {"person_type": "administrator", "group": "Op\u00e9rations : ajout"}, {"person_type": "administrator", "group": "Op\u00e9rations : modification/suppression"}, {"person_type": "administrator", "group": "Traitements : ajout"}, {"person_type": "administrator", "group": "Traitements : modification/suppression"}, {"person_type": "administrator", "group": "UE : ajout"}, {"person_type": "administrator", "group": "UE : modification/suppression"}, {"person_type": "administrator", "group": "Personnes : ajout"}, {"person_type": "administrator", "group": "Personnes : modification/suppression"}, {"person_type": "administrator", "group": "Organisations : lecture"}, {"person_type": "administrator", "group": "Organisations : modification/suppression"}, {"person_type": "administrator", "group": "Organisations : ajout"}, {"person_type": "administrator", "group": "Op\u00e9rations : cl\u00f4ture"}, {"person_type": "administrator", "group": "Dossiers : cl\u00f4ture"}, {"person_type": "administrator", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "administrator", "group": "Documents op\u00e9ration : modification/suppression"}, {"person_type": "administrator", "group": "Documents op\u00e9ration : ajout"}, {"person_type": "administrator", "group": "Personnes : lecture"}, {"person_type": "administrator", "group": "Actes administratifs rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Actes administratifs rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Actes administratifs rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "D\u00e9p\u00f4ts rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "Dossiers rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Dossiers rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Dossiers rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "Mobilier rattach\u00e9 : ajout"}, {"person_type": "administrator", "group": "Mobilier rattach\u00e9 : modification/suppression"}, {"person_type": "administrator", "group": "Mobilier rattach\u00e9 : lecture"}, {"person_type": "administrator", "group": "Op\u00e9rations rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Op\u00e9rations rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Op\u00e9rations rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Organisations rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Organisations rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Organisations rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Traitements rattach\u00e9s : ajout"}, {"person_type": "administrator", "group": "Traitements rattach\u00e9s : modification/suppression"}, {"person_type": "administrator", "group": "Traitements rattach\u00e9s : lecture"}, {"person_type": "administrator", "group": "UE rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "UE rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "UE rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Personnes rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Personnes rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Personnes rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Demandes de traitement : ajout"}, {"person_type": "administrator", "group": "Demandes de traitement : modification/suppression"}, {"person_type": "administrator", "group": "Demandes de traitement : lecture"}, {"person_type": "administrator", "group": "Demandes de traitement rattach\u00e9es : ajout"}, {"person_type": "administrator", "group": "Demandes de traitement rattach\u00e9es : lecture"}, {"person_type": "administrator", "group": "Demandes de traitement rattach\u00e9es : modification/suppression"}, {"person_type": "administrator", "group": "Auteurs : ajout"}, {"person_type": "administrator", "group": "Auteurs : modification/suppression"}, {"person_type": "administrator", "group": "Auteurs : lecture"}, {"person_type": "collaborator", "group": "Auteurs : ajout"}, {"person_type": "collaborator", "group": "Auteurs : modification/suppression"}, {"person_type": "collaborator", "group": "Auteurs : lecture"}, {"person_type": "collaborator", "group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"person_type": "collaborator", "group": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"person_type": "collaborator", "group": "Mobilier rattach\u00e9 : ajout"}, {"person_type": "collaborator", "group": "Mobilier rattach\u00e9 : modification/suppression"}, {"person_type": "collaborator", "group": "Mobilier rattach\u00e9 : lecture"}, {"person_type": "collaborator", "group": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"person_type": "collaborator", "group": "Op\u00e9rations rattach\u00e9es : lecture"}, {"person_type": "collaborator", "group": "UE rattach\u00e9es : ajout"}, {"person_type": "collaborator", "group": "UE rattach\u00e9es : modification/suppression"}, {"person_type": "collaborator", "group": "UE rattach\u00e9es : lecture"}, {"person_type": "collaborator", "group": "Personnes rattach\u00e9es : lecture"}, {"person_type": "warehouse_manager", "group": "Demandes de traitement : ajout"}, {"person_type": "warehouse_manager", "group": "Demandes de traitement : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Demandes de traitement : lecture"}, {"person_type": "warehouse_manager", "group": "UE : lecture"}, {"person_type": "warehouse_manager", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "warehouse_manager", "group": "Mobilier : lecture"}, {"person_type": "warehouse_manager", "group": "Op\u00e9rations : lecture"}, {"person_type": "warehouse_manager", "group": "Actes administratifs : lecture"}, {"person_type": "warehouse_manager", "group": "D\u00e9p\u00f4ts : ajout"}, {"person_type": "warehouse_manager", "group": "D\u00e9p\u00f4ts : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Dossiers : lecture"}, {"person_type": "warehouse_manager", "group": "Mobilier : ajout"}, {"person_type": "warehouse_manager", "group": "Mobilier : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Auteurs : lecture"}, {"person_type": "warehouse_manager", "group": "Traitements : ajout"}, {"person_type": "warehouse_manager", "group": "Traitements : modification/suppression"}, {"person_type": "warehouse_manager", "group": "Traitements : lecture"}, {"person_type": "warehouse_manager", "group": "Organisations : lecture"}, {"person_type": "warehouse_manager", "group": "Personnes : lecture"}, {"person_type": "warehouse_manager", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : lecture"}, {"person_type": "sra_agent", "group": "Dossiers : lecture"}, {"person_type": "sra_agent", "group": "UE : lecture"}, {"person_type": "sra_agent", "group": "D\u00e9p\u00f4ts : lecture"}, {"person_type": "sra_agent", "group": "Mobilier : lecture"}, {"person_type": "sra_agent", "group": "Traitements : lecture"}, {"person_type": "sra_agent", "group": "Actes administratifs : lecture"}, {"person_type": "sra_agent", "group": "Actes administratifs : ajout"}, {"person_type": "sra_agent", "group": "Actes administratifs : modification/suppression"}, {"person_type": "sra_agent", "group": "Dossiers : ajout"}, {"person_type": "sra_agent", "group": "Dossiers : modification/suppression"}, {"person_type": "sra_agent", "group": "Mobilier : ajout"}, {"person_type": "sra_agent", "group": "Mobilier : modification/suppression"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : ajout"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : modification/suppression"}, {"person_type": "sra_agent", "group": "UE : ajout"}, {"person_type": "sra_agent", "group": "UE : modification/suppression"}, {"person_type": "sra_agent", "group": "Personnes : ajout"}, {"person_type": "sra_agent", "group": "Personnes : modification/suppression"}, {"person_type": "sra_agent", "group": "Organisations : lecture"}, {"person_type": "sra_agent", "group": "Organisations : modification/suppression"}, {"person_type": "sra_agent", "group": "Organisations : ajout"}, {"person_type": "sra_agent", "group": "Op\u00e9rations : cl\u00f4ture"}, {"person_type": "sra_agent", "group": "Dossiers : cl\u00f4ture"}, {"person_type": "sra_agent", "group": "Documents op\u00e9ration : lecture"}, {"person_type": "sra_agent", "group": "Documents op\u00e9ration : modification/suppression"}, {"person_type": "sra_agent", "group": "Documents op\u00e9ration : ajout"}, {"person_type": "sra_agent", "group": "Personnes : lecture"}, {"person_type": "sra_agent", "group": "Demandes de traitement : lecture"}, {"person_type": "sra_agent", "group": "Auteurs : ajout"}, {"person_type": "sra_agent", "group": "Auteurs : modification/suppression"}, {"person_type": "sra_agent", "group": "Auteurs : lecture"}, {"person_type": "head_scientist", "group": "Op\u00e9rations : lecture"}, {"person_type": "head_scientist", "group": "Auteurs : ajout"}, {"person_type": "head_scientist", "group": "Auteurs : modification/suppression"}, {"person_type": "head_scientist", "group": "Auteurs : lecture"}, {"person_type": "head_scientist", "group": "Documents op\u00e9ration rattach\u00e9s : modification/suppression"}, {"person_type": "head_scientist", "group": "Documents op\u00e9ration rattach\u00e9s : lecture"}, {"person_type": "head_scientist", "group": "Mobilier rattach\u00e9 : ajout"}, {"person_type": "head_scientist", "group": "Mobilier rattach\u00e9 : modification/suppression"}, {"person_type": "head_scientist", "group": "Mobilier rattach\u00e9 : lecture"}, {"person_type": "head_scientist", "group": "Documents op\u00e9ration rattach\u00e9s : ajout"}, {"person_type": "head_scientist", "group": "Op\u00e9rations rattach\u00e9es : modification/suppression"}, {"person_type": "head_scientist", "group": "UE rattach\u00e9es : ajout"}, {"person_type": "head_scientist", "group": "UE rattach\u00e9es : modification/suppression"}, {"person_type": "head_scientist", "group": "UE rattach\u00e9es : lecture"}, {"person_type": "head_scientist", "group": "Personnes rattach\u00e9es : lecture"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : lecture"}, {"person_type": "secretarial_dept", "group": "Dossiers : lecture"}, {"person_type": "secretarial_dept", "group": "UE : lecture"}, {"person_type": "secretarial_dept", "group": "Mobilier : lecture"}, {"person_type": "secretarial_dept", "group": "Personnes : lecture"}, {"person_type": "secretarial_dept", "group": "Actes administratifs : lecture"}, {"person_type": "secretarial_dept", "group": "Actes administratifs : ajout"}, {"person_type": "secretarial_dept", "group": "Actes administratifs : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Dossiers : ajout"}, {"person_type": "secretarial_dept", "group": "Dossiers : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : ajout"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Personnes : ajout"}, {"person_type": "secretarial_dept", "group": "Personnes : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Organisations : lecture"}, {"person_type": "secretarial_dept", "group": "Organisations : modification/suppression"}, {"person_type": "secretarial_dept", "group": "Organisations : ajout"}, {"person_type": "secretarial_dept", "group": "Op\u00e9rations : cl\u00f4ture"}, {"person_type": "secretarial_dept", "group": "Dossiers : cl\u00f4ture"}], "permissions": [{"codename": "add_logentry", "name": "Can add log entry", "content_type": ["admin", "logentry"]}, {"codename": "change_logentry", "name": "Can change log entry", "content_type": ["admin", "logentry"]}, {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": ["admin", "logentry"]}, {"codename": "add_activitytype", "name": "Can add Activity Type", "content_type": ["archaeological_context_records", "activitytype"]}, {"codename": "change_activitytype", "name": "Can change Activity Type", "content_type": ["archaeological_context_records", "activitytype"]}, {"codename": "delete_activitytype", "name": "Can delete Activity Type", "content_type": ["archaeological_context_records", "activitytype"]}, {"codename": "add_contextrecord", "name": "Can add Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "add_own_contextrecord", "name": "Can add own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "change_contextrecord", "name": "Can change Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "change_own_contextrecord", "name": "Can change own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "delete_contextrecord", "name": "Can delete Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "delete_own_contextrecord", "name": "Can delete own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "view_contextrecord", "name": "Can view all Context Records", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "view_own_contextrecord", "name": "Can view own Context Record", "content_type": ["archaeological_context_records", "contextrecord"]}, {"codename": "add_contextrecordsource", "name": "Can add Context record documentation", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "add_own_contextrecordsource", "name": "Can add own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "change_contextrecordsource", "name": "Can change Context record documentation", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "change_own_contextrecordsource", "name": "Can change own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "delete_contextrecordsource", "name": "Can delete Context record documentation", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "delete_own_contextrecordsource", "name": "Can delete own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "view_contextrecordsource", "name": "Can view all Context record sources", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "view_own_contextrecordsource", "name": "Can view own Context record source", "content_type": ["archaeological_context_records", "contextrecordsource"]}, {"codename": "add_dating", "name": "Can add Dating", "content_type": ["archaeological_context_records", "dating"]}, {"codename": "change_dating", "name": "Can change Dating", "content_type": ["archaeological_context_records", "dating"]}, {"codename": "delete_dating", "name": "Can delete Dating", "content_type": ["archaeological_context_records", "dating"]}, {"codename": "add_datingquality", "name": "Can add Dating quality", "content_type": ["archaeological_context_records", "datingquality"]}, {"codename": "change_datingquality", "name": "Can change Dating quality", "content_type": ["archaeological_context_records", "datingquality"]}, {"codename": "delete_datingquality", "name": "Can delete Dating quality", "content_type": ["archaeological_context_records", "datingquality"]}, {"codename": "add_datingtype", "name": "Can add Dating type", "content_type": ["archaeological_context_records", "datingtype"]}, {"codename": "change_datingtype", "name": "Can change Dating type", "content_type": ["archaeological_context_records", "datingtype"]}, {"codename": "delete_datingtype", "name": "Can delete Dating type", "content_type": ["archaeological_context_records", "datingtype"]}, {"codename": "add_documentationtype", "name": "Can add Documentation type", "content_type": ["archaeological_context_records", "documentationtype"]}, {"codename": "change_documentationtype", "name": "Can change Documentation type", "content_type": ["archaeological_context_records", "documentationtype"]}, {"codename": "delete_documentationtype", "name": "Can delete Documentation type", "content_type": ["archaeological_context_records", "documentationtype"]}, {"codename": "add_excavationtechnictype", "name": "Can add Excavation technic type", "content_type": ["archaeological_context_records", "excavationtechnictype"]}, {"codename": "change_excavationtechnictype", "name": "Can change Excavation technic type", "content_type": ["archaeological_context_records", "excavationtechnictype"]}, {"codename": "delete_excavationtechnictype", "name": "Can delete Excavation technic type", "content_type": ["archaeological_context_records", "excavationtechnictype"]}, {"codename": "add_historicalcontextrecord", "name": "Can add historical context record", "content_type": ["archaeological_context_records", "historicalcontextrecord"]}, {"codename": "change_historicalcontextrecord", "name": "Can change historical context record", "content_type": ["archaeological_context_records", "historicalcontextrecord"]}, {"codename": "delete_historicalcontextrecord", "name": "Can delete historical context record", "content_type": ["archaeological_context_records", "historicalcontextrecord"]}, {"codename": "add_identificationtype", "name": "Can add Identification Type", "content_type": ["archaeological_context_records", "identificationtype"]}, {"codename": "change_identificationtype", "name": "Can change Identification Type", "content_type": ["archaeological_context_records", "identificationtype"]}, {"codename": "delete_identificationtype", "name": "Can delete Identification Type", "content_type": ["archaeological_context_records", "identificationtype"]}, {"codename": "add_recordrelations", "name": "Can add Record relation", "content_type": ["archaeological_context_records", "recordrelations"]}, {"codename": "change_recordrelations", "name": "Can change Record relation", "content_type": ["archaeological_context_records", "recordrelations"]}, {"codename": "delete_recordrelations", "name": "Can delete Record relation", "content_type": ["archaeological_context_records", "recordrelations"]}, {"codename": "add_recordrelationview", "name": "Can add record relation view", "content_type": ["archaeological_context_records", "recordrelationview"]}, {"codename": "change_recordrelationview", "name": "Can change record relation view", "content_type": ["archaeological_context_records", "recordrelationview"]}, {"codename": "delete_recordrelationview", "name": "Can delete record relation view", "content_type": ["archaeological_context_records", "recordrelationview"]}, {"codename": "add_relationtype", "name": "Can add Relation type", "content_type": ["archaeological_context_records", "relationtype"]}, {"codename": "change_relationtype", "name": "Can change Relation type", "content_type": ["archaeological_context_records", "relationtype"]}, {"codename": "delete_relationtype", "name": "Can delete Relation type", "content_type": ["archaeological_context_records", "relationtype"]}, {"codename": "add_unit", "name": "Can add Unit Type", "content_type": ["archaeological_context_records", "unit"]}, {"codename": "change_unit", "name": "Can change Unit Type", "content_type": ["archaeological_context_records", "unit"]}, {"codename": "delete_unit", "name": "Can delete Unit Type", "content_type": ["archaeological_context_records", "unit"]}, {"codename": "add_file", "name": "Can add Archaeological file", "content_type": ["archaeological_files", "file"]}, {"codename": "add_own_file", "name": "Can add own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "change_file", "name": "Can change Archaeological file", "content_type": ["archaeological_files", "file"]}, {"codename": "change_own_file", "name": "Can change own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "close_file", "name": "Can close File", "content_type": ["archaeological_files", "file"]}, {"codename": "delete_file", "name": "Can delete Archaeological file", "content_type": ["archaeological_files", "file"]}, {"codename": "delete_own_file", "name": "Can delete own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "view_file", "name": "Can view all Archaelogical files", "content_type": ["archaeological_files", "file"]}, {"codename": "view_own_file", "name": "Can view own Archaelogical file", "content_type": ["archaeological_files", "file"]}, {"codename": "add_filebydepartment", "name": "Can add file by department", "content_type": ["archaeological_files", "filebydepartment"]}, {"codename": "change_filebydepartment", "name": "Can change file by department", "content_type": ["archaeological_files", "filebydepartment"]}, {"codename": "delete_filebydepartment", "name": "Can delete file by department", "content_type": ["archaeological_files", "filebydepartment"]}, {"codename": "add_filetype", "name": "Can add Archaeological file type", "content_type": ["archaeological_files", "filetype"]}, {"codename": "change_filetype", "name": "Can change Archaeological file type", "content_type": ["archaeological_files", "filetype"]}, {"codename": "delete_filetype", "name": "Can delete Archaeological file type", "content_type": ["archaeological_files", "filetype"]}, {"codename": "add_historicalfile", "name": "Can add historical file", "content_type": ["archaeological_files", "historicalfile"]}, {"codename": "change_historicalfile", "name": "Can change historical file", "content_type": ["archaeological_files", "historicalfile"]}, {"codename": "delete_historicalfile", "name": "Can delete historical file", "content_type": ["archaeological_files", "historicalfile"]}, {"codename": "add_permittype", "name": "Can add Permit type", "content_type": ["archaeological_files", "permittype"]}, {"codename": "change_permittype", "name": "Can change Permit type", "content_type": ["archaeological_files", "permittype"]}, {"codename": "delete_permittype", "name": "Can delete Permit type", "content_type": ["archaeological_files", "permittype"]}, {"codename": "add_saisinetype", "name": "Can add Type Saisine", "content_type": ["archaeological_files", "saisinetype"]}, {"codename": "change_saisinetype", "name": "Can change Type Saisine", "content_type": ["archaeological_files", "saisinetype"]}, {"codename": "delete_saisinetype", "name": "Can delete Type Saisine", "content_type": ["archaeological_files", "saisinetype"]}, {"codename": "add_basefind", "name": "Can add Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "add_own_basefind", "name": "Can add own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "change_basefind", "name": "Can change Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "change_own_basefind", "name": "Can change own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "delete_basefind", "name": "Can delete Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "delete_own_basefind", "name": "Can delete own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "view_basefind", "name": "Can view all Base finds", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "view_own_basefind", "name": "Can view own Base find", "content_type": ["archaeological_finds", "basefind"]}, {"codename": "add_batchtype", "name": "Can add Batch type", "content_type": ["archaeological_finds", "batchtype"]}, {"codename": "change_batchtype", "name": "Can change Batch type", "content_type": ["archaeological_finds", "batchtype"]}, {"codename": "delete_batchtype", "name": "Can delete Batch type", "content_type": ["archaeological_finds", "batchtype"]}, {"codename": "add_conservatorystate", "name": "Can add Conservatory state", "content_type": ["archaeological_finds", "conservatorystate"]}, {"codename": "change_conservatorystate", "name": "Can change Conservatory state", "content_type": ["archaeological_finds", "conservatorystate"]}, {"codename": "delete_conservatorystate", "name": "Can delete Conservatory state", "content_type": ["archaeological_finds", "conservatorystate"]}, {"codename": "add_find", "name": "Can add Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "add_own_find", "name": "Can add own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "change_find", "name": "Can change Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "change_own_find", "name": "Can change own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "delete_find", "name": "Can delete Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "delete_own_find", "name": "Can delete own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "view_find", "name": "Can view all Finds", "content_type": ["archaeological_finds", "find"]}, {"codename": "view_own_find", "name": "Can view own Find", "content_type": ["archaeological_finds", "find"]}, {"codename": "add_findbasket", "name": "Can add find basket", "content_type": ["archaeological_finds", "findbasket"]}, {"codename": "change_findbasket", "name": "Can change find basket", "content_type": ["archaeological_finds", "findbasket"]}, {"codename": "delete_findbasket", "name": "Can delete find basket", "content_type": ["archaeological_finds", "findbasket"]}, {"codename": "add_finddownstreamtreatments", "name": "Can add find downstream treatments", "content_type": ["archaeological_finds", "finddownstreamtreatments"]}, {"codename": "change_finddownstreamtreatments", "name": "Can change find downstream treatments", "content_type": ["archaeological_finds", "finddownstreamtreatments"]}, {"codename": "delete_finddownstreamtreatments", "name": "Can delete find downstream treatments", "content_type": ["archaeological_finds", "finddownstreamtreatments"]}, {"codename": "add_findsource", "name": "Can add Find documentation", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "add_own_findsource", "name": "Can add own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "change_findsource", "name": "Can change Find documentation", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "change_own_findsource", "name": "Can change own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "delete_findsource", "name": "Can delete Find documentation", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "delete_own_findsource", "name": "Can delete own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "view_findsource", "name": "Can view all Find sources", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "view_own_findsource", "name": "Can view own Find source", "content_type": ["archaeological_finds", "findsource"]}, {"codename": "add_findtreatments", "name": "Can add find treatments", "content_type": ["archaeological_finds", "findtreatments"]}, {"codename": "change_findtreatments", "name": "Can change find treatments", "content_type": ["archaeological_finds", "findtreatments"]}, {"codename": "delete_findtreatments", "name": "Can delete find treatments", "content_type": ["archaeological_finds", "findtreatments"]}, {"codename": "add_findupstreamtreatments", "name": "Can add find upstream treatments", "content_type": ["archaeological_finds", "findupstreamtreatments"]}, {"codename": "change_findupstreamtreatments", "name": "Can change find upstream treatments", "content_type": ["archaeological_finds", "findupstreamtreatments"]}, {"codename": "delete_findupstreamtreatments", "name": "Can delete find upstream treatments", "content_type": ["archaeological_finds", "findupstreamtreatments"]}, {"codename": "add_historicalbasefind", "name": "Can add historical base find", "content_type": ["archaeological_finds", "historicalbasefind"]}, {"codename": "change_historicalbasefind", "name": "Can change historical base find", "content_type": ["archaeological_finds", "historicalbasefind"]}, {"codename": "delete_historicalbasefind", "name": "Can delete historical base find", "content_type": ["archaeological_finds", "historicalbasefind"]}, {"codename": "add_historicalfind", "name": "Can add historical find", "content_type": ["archaeological_finds", "historicalfind"]}, {"codename": "change_historicalfind", "name": "Can change historical find", "content_type": ["archaeological_finds", "historicalfind"]}, {"codename": "delete_historicalfind", "name": "Can delete historical find", "content_type": ["archaeological_finds", "historicalfind"]}, {"codename": "add_historicaltreatment", "name": "Can add historical treatment", "content_type": ["archaeological_finds", "historicaltreatment"]}, {"codename": "change_historicaltreatment", "name": "Can change historical treatment", "content_type": ["archaeological_finds", "historicaltreatment"]}, {"codename": "delete_historicaltreatment", "name": "Can delete historical treatment", "content_type": ["archaeological_finds", "historicaltreatment"]}, {"codename": "add_historicaltreatmentfile", "name": "Can add historical treatment file", "content_type": ["archaeological_finds", "historicaltreatmentfile"]}, {"codename": "change_historicaltreatmentfile", "name": "Can change historical treatment file", "content_type": ["archaeological_finds", "historicaltreatmentfile"]}, {"codename": "delete_historicaltreatmentfile", "name": "Can delete historical treatment file", "content_type": ["archaeological_finds", "historicaltreatmentfile"]}, {"codename": "add_integritytype", "name": "Can add Integrity type", "content_type": ["archaeological_finds", "integritytype"]}, {"codename": "change_integritytype", "name": "Can change Integrity type", "content_type": ["archaeological_finds", "integritytype"]}, {"codename": "delete_integritytype", "name": "Can delete Integrity type", "content_type": ["archaeological_finds", "integritytype"]}, {"codename": "add_materialtype", "name": "Can add Material type", "content_type": ["archaeological_finds", "materialtype"]}, {"codename": "change_materialtype", "name": "Can change Material type", "content_type": ["archaeological_finds", "materialtype"]}, {"codename": "delete_materialtype", "name": "Can delete Material type", "content_type": ["archaeological_finds", "materialtype"]}, {"codename": "add_objecttype", "name": "Can add Object type", "content_type": ["archaeological_finds", "objecttype"]}, {"codename": "change_objecttype", "name": "Can change Object type", "content_type": ["archaeological_finds", "objecttype"]}, {"codename": "delete_objecttype", "name": "Can delete Object type", "content_type": ["archaeological_finds", "objecttype"]}, {"codename": "add_preservationtype", "name": "Can add Preservation type", "content_type": ["archaeological_finds", "preservationtype"]}, {"codename": "change_preservationtype", "name": "Can change Preservation type", "content_type": ["archaeological_finds", "preservationtype"]}, {"codename": "delete_preservationtype", "name": "Can delete Preservation type", "content_type": ["archaeological_finds", "preservationtype"]}, {"codename": "add_property", "name": "Can add Property", "content_type": ["archaeological_finds", "property"]}, {"codename": "change_property", "name": "Can change Property", "content_type": ["archaeological_finds", "property"]}, {"codename": "delete_property", "name": "Can delete Property", "content_type": ["archaeological_finds", "property"]}, {"codename": "add_remarkabilitytype", "name": "Can add Remarkability type", "content_type": ["archaeological_finds", "remarkabilitytype"]}, {"codename": "change_remarkabilitytype", "name": "Can change Remarkability type", "content_type": ["archaeological_finds", "remarkabilitytype"]}, {"codename": "delete_remarkabilitytype", "name": "Can delete Remarkability type", "content_type": ["archaeological_finds", "remarkabilitytype"]}, {"codename": "add_own_treatment", "name": "Can add own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "add_treatment", "name": "Can add Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "change_own_treatment", "name": "Can change own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "change_treatment", "name": "Can change Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "delete_own_treatment", "name": "Can delete own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "delete_treatment", "name": "Can delete Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "view_own_treatment", "name": "Can view own Treatment", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "view_treatment", "name": "Can view all Treatments", "content_type": ["archaeological_finds", "treatment"]}, {"codename": "add_filetreatment", "name": "Can add Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "add_own_filetreatment", "name": "Can add own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "add_treatmentfile", "name": "Can add Treatment file", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "change_filetreatment", "name": "Can change Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "change_own_filetreatment", "name": "Can change own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "change_treatmentfile", "name": "Can change Treatment file", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "delete_filetreatment", "name": "Can delete Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "delete_own_filetreatment", "name": "Can delete own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "delete_treatmentfile", "name": "Can delete Treatment file", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "view_filetreatment", "name": "Can view all Treatment requests", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "view_own_filetreatment", "name": "Can view own Treatment request", "content_type": ["archaeological_finds", "treatmentfile"]}, {"codename": "add_own_filetreatmentsource", "name": "Can add own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "add_treatmentfilesource", "name": "Can add Treatment file documentation", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "change_own_filetreatmentsource", "name": "Can change own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "change_treatmentfilesource", "name": "Can change Treatment file documentation", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "delete_own_filetreatmentsource", "name": "Can delete own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "delete_treatmentfilesource", "name": "Can delete Treatment file documentation", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "view_filetreatmentsource", "name": "Can view all Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "view_own_filetreatmentsource", "name": "Can view own Treatment request source", "content_type": ["archaeological_finds", "treatmentfilesource"]}, {"codename": "add_treatmentfiletype", "name": "Can add Treatment file type", "content_type": ["archaeological_finds", "treatmentfiletype"]}, {"codename": "change_treatmentfiletype", "name": "Can change Treatment file type", "content_type": ["archaeological_finds", "treatmentfiletype"]}, {"codename": "delete_treatmentfiletype", "name": "Can delete Treatment file type", "content_type": ["archaeological_finds", "treatmentfiletype"]}, {"codename": "add_own_treatmentsource", "name": "Can add own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "add_treatmentsource", "name": "Can add Treatment documentation", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "change_own_treatmentsource", "name": "Can change own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "change_treatmentsource", "name": "Can change Treatment documentation", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "delete_own_treatmentsource", "name": "Can delete own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "delete_treatmentsource", "name": "Can delete Treatment documentation", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "view_own_treatmentsource", "name": "Can view own Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "view_treatmentsource", "name": "Can view all Treatment source", "content_type": ["archaeological_finds", "treatmentsource"]}, {"codename": "add_treatmentstate", "name": "Can add Type of treatment state", "content_type": ["archaeological_finds", "treatmentstate"]}, {"codename": "change_treatmentstate", "name": "Can change Type of treatment state", "content_type": ["archaeological_finds", "treatmentstate"]}, {"codename": "delete_treatmentstate", "name": "Can delete Type of treatment state", "content_type": ["archaeological_finds", "treatmentstate"]}, {"codename": "add_treatmenttype", "name": "Can add Treatment type", "content_type": ["archaeological_finds", "treatmenttype"]}, {"codename": "change_treatmenttype", "name": "Can change Treatment type", "content_type": ["archaeological_finds", "treatmenttype"]}, {"codename": "delete_treatmenttype", "name": "Can delete Treatment type", "content_type": ["archaeological_finds", "treatmenttype"]}, {"codename": "add_acttype", "name": "Can add Act type", "content_type": ["archaeological_operations", "acttype"]}, {"codename": "change_acttype", "name": "Can change Act type", "content_type": ["archaeological_operations", "acttype"]}, {"codename": "delete_acttype", "name": "Can delete Act type", "content_type": ["archaeological_operations", "acttype"]}, {"codename": "add_administrativeact", "name": "Can add Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "add_own_administrativeact", "name": "Can add own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "change_administrativeact", "name": "Can change Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "change_own_administrativeact", "name": "Can change own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "delete_administrativeact", "name": "Can delete Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "delete_own_administrativeact", "name": "Can delete own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "view_administrativeact", "name": "Can view all Administrative acts", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "view_own_administrativeact", "name": "Can view own Administrative act", "content_type": ["archaeological_operations", "administrativeact"]}, {"codename": "add_archaeologicalsite", "name": "Can add Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "add_own_archaeologicalsite", "name": "Can add own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "change_archaeologicalsite", "name": "Can change Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "change_own_archaeologicalsite", "name": "Can change own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "delete_archaeologicalsite", "name": "Can delete Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "delete_own_archaeologicalsite", "name": "Can delete own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "view_archaeologicalsite", "name": "Can view all Archaeological sites", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "view_own_archaeologicalsite", "name": "Can view own Archaeological site", "content_type": ["archaeological_operations", "archaeologicalsite"]}, {"codename": "add_historicaladministrativeact", "name": "Can add historical administrative act", "content_type": ["archaeological_operations", "historicaladministrativeact"]}, {"codename": "change_historicaladministrativeact", "name": "Can change historical administrative act", "content_type": ["archaeological_operations", "historicaladministrativeact"]}, {"codename": "delete_historicaladministrativeact", "name": "Can delete historical administrative act", "content_type": ["archaeological_operations", "historicaladministrativeact"]}, {"codename": "add_historicaloperation", "name": "Can add historical operation", "content_type": ["archaeological_operations", "historicaloperation"]}, {"codename": "change_historicaloperation", "name": "Can change historical operation", "content_type": ["archaeological_operations", "historicaloperation"]}, {"codename": "delete_historicaloperation", "name": "Can delete historical operation", "content_type": ["archaeological_operations", "historicaloperation"]}, {"codename": "add_operation", "name": "Can add Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "add_own_operation", "name": "Can add own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "change_operation", "name": "Can change Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "change_own_operation", "name": "Can change own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "close_operation", "name": "Can close Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "delete_operation", "name": "Can delete Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "delete_own_operation", "name": "Can delete own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "view_operation", "name": "Can view all Operations", "content_type": ["archaeological_operations", "operation"]}, {"codename": "view_own_operation", "name": "Can view own Operation", "content_type": ["archaeological_operations", "operation"]}, {"codename": "add_operationbydepartment", "name": "Can add operation by department", "content_type": ["archaeological_operations", "operationbydepartment"]}, {"codename": "change_operationbydepartment", "name": "Can change operation by department", "content_type": ["archaeological_operations", "operationbydepartment"]}, {"codename": "delete_operationbydepartment", "name": "Can delete operation by department", "content_type": ["archaeological_operations", "operationbydepartment"]}, {"codename": "add_operationsource", "name": "Can add Operation documentation", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "add_own_operationsource", "name": "Can add own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "change_operationsource", "name": "Can change Operation documentation", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "change_own_operationsource", "name": "Can change own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "delete_operationsource", "name": "Can delete Operation documentation", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "delete_own_operationsource", "name": "Can delete own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "view_operationsource", "name": "Can view all Operation sources", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "view_own_operationsource", "name": "Can view own Operation source", "content_type": ["archaeological_operations", "operationsource"]}, {"codename": "add_operationtypeold", "name": "Can add Operation type old", "content_type": ["archaeological_operations", "operationtypeold"]}, {"codename": "change_operationtypeold", "name": "Can change Operation type old", "content_type": ["archaeological_operations", "operationtypeold"]}, {"codename": "delete_operationtypeold", "name": "Can delete Operation type old", "content_type": ["archaeological_operations", "operationtypeold"]}, {"codename": "add_parcel", "name": "Can add Parcel", "content_type": ["archaeological_operations", "parcel"]}, {"codename": "change_parcel", "name": "Can change Parcel", "content_type": ["archaeological_operations", "parcel"]}, {"codename": "delete_parcel", "name": "Can delete Parcel", "content_type": ["archaeological_operations", "parcel"]}, {"codename": "add_parcelowner", "name": "Can add Parcel owner", "content_type": ["archaeological_operations", "parcelowner"]}, {"codename": "change_parcelowner", "name": "Can change Parcel owner", "content_type": ["archaeological_operations", "parcelowner"]}, {"codename": "delete_parcelowner", "name": "Can delete Parcel owner", "content_type": ["archaeological_operations", "parcelowner"]}, {"codename": "add_period", "name": "Can add Type Period", "content_type": ["archaeological_operations", "period"]}, {"codename": "change_period", "name": "Can change Type Period", "content_type": ["archaeological_operations", "period"]}, {"codename": "delete_period", "name": "Can delete Type Period", "content_type": ["archaeological_operations", "period"]}, {"codename": "add_recordrelations", "name": "Can add Operation record relation", "content_type": ["archaeological_operations", "recordrelations"]}, {"codename": "change_recordrelations", "name": "Can change Operation record relation", "content_type": ["archaeological_operations", "recordrelations"]}, {"codename": "delete_recordrelations", "name": "Can delete Operation record relation", "content_type": ["archaeological_operations", "recordrelations"]}, {"codename": "add_relationtype", "name": "Can add Operation relation type", "content_type": ["archaeological_operations", "relationtype"]}, {"codename": "change_relationtype", "name": "Can change Operation relation type", "content_type": ["archaeological_operations", "relationtype"]}, {"codename": "delete_relationtype", "name": "Can delete Operation relation type", "content_type": ["archaeological_operations", "relationtype"]}, {"codename": "add_remaintype", "name": "Can add Remain type", "content_type": ["archaeological_operations", "remaintype"]}, {"codename": "change_remaintype", "name": "Can change Remain type", "content_type": ["archaeological_operations", "remaintype"]}, {"codename": "delete_remaintype", "name": "Can delete Remain type", "content_type": ["archaeological_operations", "remaintype"]}, {"codename": "add_reportstate", "name": "Can add Report state", "content_type": ["archaeological_operations", "reportstate"]}, {"codename": "change_reportstate", "name": "Can change Report state", "content_type": ["archaeological_operations", "reportstate"]}, {"codename": "delete_reportstate", "name": "Can delete Report state", "content_type": ["archaeological_operations", "reportstate"]}, {"codename": "add_collection", "name": "Can add Collection", "content_type": ["archaeological_warehouse", "collection"]}, {"codename": "change_collection", "name": "Can change Collection", "content_type": ["archaeological_warehouse", "collection"]}, {"codename": "delete_collection", "name": "Can delete Collection", "content_type": ["archaeological_warehouse", "collection"]}, {"codename": "add_container", "name": "Can add Container", "content_type": ["archaeological_warehouse", "container"]}, {"codename": "change_container", "name": "Can change Container", "content_type": ["archaeological_warehouse", "container"]}, {"codename": "delete_container", "name": "Can delete Container", "content_type": ["archaeological_warehouse", "container"]}, {"codename": "add_containerlocalisation", "name": "Can add Container localisation", "content_type": ["archaeological_warehouse", "containerlocalisation"]}, {"codename": "change_containerlocalisation", "name": "Can change Container localisation", "content_type": ["archaeological_warehouse", "containerlocalisation"]}, {"codename": "delete_containerlocalisation", "name": "Can delete Container localisation", "content_type": ["archaeological_warehouse", "containerlocalisation"]}, {"codename": "add_containertype", "name": "Can add Container type", "content_type": ["archaeological_warehouse", "containertype"]}, {"codename": "change_containertype", "name": "Can change Container type", "content_type": ["archaeological_warehouse", "containertype"]}, {"codename": "delete_containertype", "name": "Can delete Container type", "content_type": ["archaeological_warehouse", "containertype"]}, {"codename": "add_own_warehouse", "name": "Can add own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "add_warehouse", "name": "Can add Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "change_own_warehouse", "name": "Can change own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "change_warehouse", "name": "Can change Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "delete_own_warehouse", "name": "Can delete own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "delete_warehouse", "name": "Can delete Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "view_own_warehouse", "name": "Can view own Warehouse", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "view_warehouse", "name": "Can view all Warehouses", "content_type": ["archaeological_warehouse", "warehouse"]}, {"codename": "add_warehousedivision", "name": "Can add Warehouse division", "content_type": ["archaeological_warehouse", "warehousedivision"]}, {"codename": "change_warehousedivision", "name": "Can change Warehouse division", "content_type": ["archaeological_warehouse", "warehousedivision"]}, {"codename": "delete_warehousedivision", "name": "Can delete Warehouse division", "content_type": ["archaeological_warehouse", "warehousedivision"]}, {"codename": "add_warehousedivisionlink", "name": "Can add warehouse division link", "content_type": ["archaeological_warehouse", "warehousedivisionlink"]}, {"codename": "change_warehousedivisionlink", "name": "Can change warehouse division link", "content_type": ["archaeological_warehouse", "warehousedivisionlink"]}, {"codename": "delete_warehousedivisionlink", "name": "Can delete warehouse division link", "content_type": ["archaeological_warehouse", "warehousedivisionlink"]}, {"codename": "add_warehousetype", "name": "Can add Warehouse type", "content_type": ["archaeological_warehouse", "warehousetype"]}, {"codename": "change_warehousetype", "name": "Can change Warehouse type", "content_type": ["archaeological_warehouse", "warehousetype"]}, {"codename": "delete_warehousetype", "name": "Can delete Warehouse type", "content_type": ["archaeological_warehouse", "warehousetype"]}, {"codename": "add_group", "name": "Can add group", "content_type": ["auth", "group"]}, {"codename": "change_group", "name": "Can change group", "content_type": ["auth", "group"]}, {"codename": "delete_group", "name": "Can delete group", "content_type": ["auth", "group"]}, {"codename": "add_permission", "name": "Can add permission", "content_type": ["auth", "permission"]}, {"codename": "change_permission", "name": "Can change permission", "content_type": ["auth", "permission"]}, {"codename": "delete_permission", "name": "Can delete permission", "content_type": ["auth", "permission"]}, {"codename": "add_user", "name": "Can add user", "content_type": ["auth", "user"]}, {"codename": "change_user", "name": "Can change user", "content_type": ["auth", "user"]}, {"codename": "delete_user", "name": "Can delete user", "content_type": ["auth", "user"]}, {"codename": "add_contenttype", "name": "Can add content type", "content_type": ["contenttypes", "contenttype"]}, {"codename": "change_contenttype", "name": "Can change content type", "content_type": ["contenttypes", "contenttype"]}, {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": ["contenttypes", "contenttype"]}, {"codename": "add_arrondissement", "name": "Can add arrondissement", "content_type": ["ishtar_common", "arrondissement"]}, {"codename": "change_arrondissement", "name": "Can change arrondissement", "content_type": ["ishtar_common", "arrondissement"]}, {"codename": "delete_arrondissement", "name": "Can delete arrondissement", "content_type": ["ishtar_common", "arrondissement"]}, {"codename": "add_author", "name": "Can add Author", "content_type": ["ishtar_common", "author"]}, {"codename": "add_own_author", "name": "Can add own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "change_author", "name": "Can change Author", "content_type": ["ishtar_common", "author"]}, {"codename": "change_own_author", "name": "Can change own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "delete_author", "name": "Can delete Author", "content_type": ["ishtar_common", "author"]}, {"codename": "delete_own_author", "name": "Can delete own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "view_author", "name": "Can view all Authors", "content_type": ["ishtar_common", "author"]}, {"codename": "view_own_author", "name": "Can view own Author", "content_type": ["ishtar_common", "author"]}, {"codename": "add_authortype", "name": "Can add Author type", "content_type": ["ishtar_common", "authortype"]}, {"codename": "change_authortype", "name": "Can change Author type", "content_type": ["ishtar_common", "authortype"]}, {"codename": "delete_authortype", "name": "Can delete Author type", "content_type": ["ishtar_common", "authortype"]}, {"codename": "add_canton", "name": "Can add canton", "content_type": ["ishtar_common", "canton"]}, {"codename": "change_canton", "name": "Can change canton", "content_type": ["ishtar_common", "canton"]}, {"codename": "delete_canton", "name": "Can delete canton", "content_type": ["ishtar_common", "canton"]}, {"codename": "add_department", "name": "Can add Department", "content_type": ["ishtar_common", "department"]}, {"codename": "change_department", "name": "Can change Department", "content_type": ["ishtar_common", "department"]}, {"codename": "delete_department", "name": "Can delete Department", "content_type": ["ishtar_common", "department"]}, {"codename": "add_documenttemplate", "name": "Can add Document template", "content_type": ["ishtar_common", "documenttemplate"]}, {"codename": "change_documenttemplate", "name": "Can change Document template", "content_type": ["ishtar_common", "documenttemplate"]}, {"codename": "delete_documenttemplate", "name": "Can delete Document template", "content_type": ["ishtar_common", "documenttemplate"]}, {"codename": "add_format", "name": "Can add Format", "content_type": ["ishtar_common", "format"]}, {"codename": "change_format", "name": "Can change Format", "content_type": ["ishtar_common", "format"]}, {"codename": "delete_format", "name": "Can delete Format", "content_type": ["ishtar_common", "format"]}, {"codename": "add_formatertype", "name": "Can add Importer - Formater type", "content_type": ["ishtar_common", "formatertype"]}, {"codename": "change_formatertype", "name": "Can change Importer - Formater type", "content_type": ["ishtar_common", "formatertype"]}, {"codename": "delete_formatertype", "name": "Can delete Importer - Formater type", "content_type": ["ishtar_common", "formatertype"]}, {"codename": "add_globalvar", "name": "Can add Global variable", "content_type": ["ishtar_common", "globalvar"]}, {"codename": "change_globalvar", "name": "Can change Global variable", "content_type": ["ishtar_common", "globalvar"]}, {"codename": "delete_globalvar", "name": "Can delete Global variable", "content_type": ["ishtar_common", "globalvar"]}, {"codename": "add_historicalorganization", "name": "Can add historical organization", "content_type": ["ishtar_common", "historicalorganization"]}, {"codename": "change_historicalorganization", "name": "Can change historical organization", "content_type": ["ishtar_common", "historicalorganization"]}, {"codename": "delete_historicalorganization", "name": "Can delete historical organization", "content_type": ["ishtar_common", "historicalorganization"]}, {"codename": "add_historicalperson", "name": "Can add historical person", "content_type": ["ishtar_common", "historicalperson"]}, {"codename": "change_historicalperson", "name": "Can change historical person", "content_type": ["ishtar_common", "historicalperson"]}, {"codename": "delete_historicalperson", "name": "Can delete historical person", "content_type": ["ishtar_common", "historicalperson"]}, {"codename": "add_import", "name": "Can add Import", "content_type": ["ishtar_common", "import"]}, {"codename": "change_import", "name": "Can change Import", "content_type": ["ishtar_common", "import"]}, {"codename": "delete_import", "name": "Can delete Import", "content_type": ["ishtar_common", "import"]}, {"codename": "add_importercolumn", "name": "Can add Importer - Column", "content_type": ["ishtar_common", "importercolumn"]}, {"codename": "change_importercolumn", "name": "Can change Importer - Column", "content_type": ["ishtar_common", "importercolumn"]}, {"codename": "delete_importercolumn", "name": "Can delete Importer - Column", "content_type": ["ishtar_common", "importercolumn"]}, {"codename": "add_importerdefault", "name": "Can add Importer - Default", "content_type": ["ishtar_common", "importerdefault"]}, {"codename": "change_importerdefault", "name": "Can change Importer - Default", "content_type": ["ishtar_common", "importerdefault"]}, {"codename": "delete_importerdefault", "name": "Can delete Importer - Default", "content_type": ["ishtar_common", "importerdefault"]}, {"codename": "add_importerdefaultvalues", "name": "Can add Importer - Default value", "content_type": ["ishtar_common", "importerdefaultvalues"]}, {"codename": "change_importerdefaultvalues", "name": "Can change Importer - Default value", "content_type": ["ishtar_common", "importerdefaultvalues"]}, {"codename": "delete_importerdefaultvalues", "name": "Can delete Importer - Default value", "content_type": ["ishtar_common", "importerdefaultvalues"]}, {"codename": "add_importerduplicatefield", "name": "Can add Importer - Duplicate field", "content_type": ["ishtar_common", "importerduplicatefield"]}, {"codename": "change_importerduplicatefield", "name": "Can change Importer - Duplicate field", "content_type": ["ishtar_common", "importerduplicatefield"]}, {"codename": "delete_importerduplicatefield", "name": "Can delete Importer - Duplicate field", "content_type": ["ishtar_common", "importerduplicatefield"]}, {"codename": "add_importermodel", "name": "Can add Importer - Model", "content_type": ["ishtar_common", "importermodel"]}, {"codename": "change_importermodel", "name": "Can change Importer - Model", "content_type": ["ishtar_common", "importermodel"]}, {"codename": "delete_importermodel", "name": "Can delete Importer - Model", "content_type": ["ishtar_common", "importermodel"]}, {"codename": "add_importertype", "name": "Can add Importer - Type", "content_type": ["ishtar_common", "importertype"]}, {"codename": "change_importertype", "name": "Can change Importer - Type", "content_type": ["ishtar_common", "importertype"]}, {"codename": "delete_importertype", "name": "Can delete Importer - Type", "content_type": ["ishtar_common", "importertype"]}, {"codename": "add_importtarget", "name": "Can add Importer - Target", "content_type": ["ishtar_common", "importtarget"]}, {"codename": "change_importtarget", "name": "Can change Importer - Target", "content_type": ["ishtar_common", "importtarget"]}, {"codename": "delete_importtarget", "name": "Can delete Importer - Target", "content_type": ["ishtar_common", "importtarget"]}, {"codename": "add_ishtarsiteprofile", "name": "Can add Ishtar site profile", "content_type": ["ishtar_common", "ishtarsiteprofile"]}, {"codename": "change_ishtarsiteprofile", "name": "Can change Ishtar site profile", "content_type": ["ishtar_common", "ishtarsiteprofile"]}, {"codename": "delete_ishtarsiteprofile", "name": "Can delete Ishtar site profile", "content_type": ["ishtar_common", "ishtarsiteprofile"]}, {"codename": "add_ishtaruser", "name": "Can add Ishtar user", "content_type": ["ishtar_common", "ishtaruser"]}, {"codename": "change_ishtaruser", "name": "Can change Ishtar user", "content_type": ["ishtar_common", "ishtaruser"]}, {"codename": "delete_ishtaruser", "name": "Can delete Ishtar user", "content_type": ["ishtar_common", "ishtaruser"]}, {"codename": "add_itemkey", "name": "Can add item key", "content_type": ["ishtar_common", "itemkey"]}, {"codename": "change_itemkey", "name": "Can change item key", "content_type": ["ishtar_common", "itemkey"]}, {"codename": "delete_itemkey", "name": "Can delete item key", "content_type": ["ishtar_common", "itemkey"]}, {"codename": "add_operationtype", "name": "Can add Operation type", "content_type": ["ishtar_common", "operationtype"]}, {"codename": "change_operationtype", "name": "Can change Operation type", "content_type": ["ishtar_common", "operationtype"]}, {"codename": "delete_operationtype", "name": "Can delete Operation type", "content_type": ["ishtar_common", "operationtype"]}, {"codename": "add_organization", "name": "Can add Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "add_own_organization", "name": "Can add own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "change_organization", "name": "Can change Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "change_own_organization", "name": "Can change own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "delete_organization", "name": "Can delete Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "delete_own_organization", "name": "Can delete own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "view_organization", "name": "Can view all Organizations", "content_type": ["ishtar_common", "organization"]}, {"codename": "view_own_organization", "name": "Can view own Organization", "content_type": ["ishtar_common", "organization"]}, {"codename": "add_organizationtype", "name": "Can add Organization type", "content_type": ["ishtar_common", "organizationtype"]}, {"codename": "change_organizationtype", "name": "Can change Organization type", "content_type": ["ishtar_common", "organizationtype"]}, {"codename": "delete_organizationtype", "name": "Can delete Organization type", "content_type": ["ishtar_common", "organizationtype"]}, {"codename": "add_own_person", "name": "Can add own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "add_person", "name": "Can add Person", "content_type": ["ishtar_common", "person"]}, {"codename": "change_own_person", "name": "Can change own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "change_person", "name": "Can change Person", "content_type": ["ishtar_common", "person"]}, {"codename": "delete_own_person", "name": "Can delete own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "delete_person", "name": "Can delete Person", "content_type": ["ishtar_common", "person"]}, {"codename": "view_own_person", "name": "Can view own Person", "content_type": ["ishtar_common", "person"]}, {"codename": "view_person", "name": "Can view all Persons", "content_type": ["ishtar_common", "person"]}, {"codename": "add_persontype", "name": "Can add Person type", "content_type": ["ishtar_common", "persontype"]}, {"codename": "change_persontype", "name": "Can change Person type", "content_type": ["ishtar_common", "persontype"]}, {"codename": "delete_persontype", "name": "Can delete Person type", "content_type": ["ishtar_common", "persontype"]}, {"codename": "add_regexp", "name": "Can add Importer - Regular expression", "content_type": ["ishtar_common", "regexp"]}, {"codename": "change_regexp", "name": "Can change Importer - Regular expression", "content_type": ["ishtar_common", "regexp"]}, {"codename": "delete_regexp", "name": "Can delete Importer - Regular expression", "content_type": ["ishtar_common", "regexp"]}, {"codename": "add_sourcetype", "name": "Can add Source type", "content_type": ["ishtar_common", "sourcetype"]}, {"codename": "change_sourcetype", "name": "Can change Source type", "content_type": ["ishtar_common", "sourcetype"]}, {"codename": "delete_sourcetype", "name": "Can delete Source type", "content_type": ["ishtar_common", "sourcetype"]}, {"codename": "add_spatialreferencesystem", "name": "Can add Spatial reference system", "content_type": ["ishtar_common", "spatialreferencesystem"]}, {"codename": "change_spatialreferencesystem", "name": "Can change Spatial reference system", "content_type": ["ishtar_common", "spatialreferencesystem"]}, {"codename": "delete_spatialreferencesystem", "name": "Can delete Spatial reference system", "content_type": ["ishtar_common", "spatialreferencesystem"]}, {"codename": "add_state", "name": "Can add State", "content_type": ["ishtar_common", "state"]}, {"codename": "change_state", "name": "Can change State", "content_type": ["ishtar_common", "state"]}, {"codename": "delete_state", "name": "Can delete State", "content_type": ["ishtar_common", "state"]}, {"codename": "add_supporttype", "name": "Can add Support type", "content_type": ["ishtar_common", "supporttype"]}, {"codename": "change_supporttype", "name": "Can change Support type", "content_type": ["ishtar_common", "supporttype"]}, {"codename": "delete_supporttype", "name": "Can delete Support type", "content_type": ["ishtar_common", "supporttype"]}, {"codename": "add_targetkey", "name": "Can add Importer - Target key", "content_type": ["ishtar_common", "targetkey"]}, {"codename": "change_targetkey", "name": "Can change Importer - Target key", "content_type": ["ishtar_common", "targetkey"]}, {"codename": "delete_targetkey", "name": "Can delete Importer - Target key", "content_type": ["ishtar_common", "targetkey"]}, {"codename": "add_titletype", "name": "Can add Title type", "content_type": ["ishtar_common", "titletype"]}, {"codename": "change_titletype", "name": "Can change Title type", "content_type": ["ishtar_common", "titletype"]}, {"codename": "delete_titletype", "name": "Can delete Title type", "content_type": ["ishtar_common", "titletype"]}, {"codename": "add_town", "name": "Can add Town", "content_type": ["ishtar_common", "town"]}, {"codename": "change_town", "name": "Can change Town", "content_type": ["ishtar_common", "town"]}, {"codename": "delete_town", "name": "Can delete Town", "content_type": ["ishtar_common", "town"]}, {"codename": "add_registrationprofile", "name": "Can add registration profile", "content_type": ["registration", "registrationprofile"]}, {"codename": "change_registrationprofile", "name": "Can change registration profile", "content_type": ["registration", "registrationprofile"]}, {"codename": "delete_registrationprofile", "name": "Can delete registration profile", "content_type": ["registration", "registrationprofile"]}, {"codename": "add_session", "name": "Can add session", "content_type": ["sessions", "session"]}, {"codename": "change_session", "name": "Can change session", "content_type": ["sessions", "session"]}, {"codename": "delete_session", "name": "Can delete session", "content_type": ["sessions", "session"]}, {"codename": "add_site", "name": "Can add site", "content_type": ["sites", "site"]}, {"codename": "change_site", "name": "Can change site", "content_type": ["sites", "site"]}, {"codename": "delete_site", "name": "Can delete site", "content_type": ["sites", "site"]}, {"codename": "add_migrationhistory", "name": "Can add migration history", "content_type": ["south", "migrationhistory"]}, {"codename": "change_migrationhistory", "name": "Can change migration history", "content_type": ["south", "migrationhistory"]}, {"codename": "delete_migrationhistory", "name": "Can delete migration history", "content_type": ["south", "migrationhistory"]}]} \ No newline at end of file
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index ecae18c5e..7eb36f6cc 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -80,7 +80,7 @@ class FloatField(forms.FloatField):
Allow the use of comma for separating float fields
"""
def clean(self, value):
- if value:
+ if value and (isinstance(value, unicode) or isinstance(value, str)):
value = value.replace(',', '.').replace('%', '')
return super(FloatField, self).clean(value)
diff --git a/ishtar_common/locale/django.pot b/ishtar_common/locale/django.pot
index 9611caded..002f724cf 100644
--- a/ishtar_common/locale/django.pot
+++ b/ishtar_common/locale/django.pot
@@ -176,12 +176,12 @@ msgstr ""
msgid "Add a new item"
msgstr ""
-#: forms.py:297 models.py:1501
+#: forms.py:297 models.py:1556
msgid "Template"
msgstr ""
#: forms_common.py:41 forms_common.py:59 forms_common.py:184
-#: forms_common.py:408 models.py:1567 models.py:3030
+#: forms_common.py:408 models.py:1622 models.py:3085
#: templates/blocks/JQueryAdvancedTown.html:19
#: templates/ishtar/sheet_organization.html:13
msgid "Town"
@@ -197,8 +197,8 @@ msgid ""
"french town Saint-Denis in the Seine-Saint-Denis department.</p>"
msgstr ""
-#: forms_common.py:68 forms_common.py:863 ishtar_menu.py:47 models.py:2630
-#: models.py:2823 models.py:2885 templates/ishtar/sheet_person.html:4
+#: forms_common.py:68 forms_common.py:863 ishtar_menu.py:47 models.py:2685
+#: models.py:2878 models.py:2940 templates/ishtar/sheet_person.html:4
msgid "Person"
msgstr ""
@@ -209,64 +209,64 @@ msgid ""
msgstr ""
#: forms_common.py:172 forms_common.py:329 forms_common.py:453
-#: ishtar_menu.py:75 models.py:2513 models.py:2604
+#: ishtar_menu.py:75 models.py:2568 models.py:2659
#: templates/ishtar/sheet_organization.html:4
msgid "Organization"
msgstr ""
#: forms_common.py:175 forms_common.py:212 forms_common.py:324
-#: forms_common.py:378 forms_common.py:448 models.py:1109 models.py:1500
-#: models.py:1769 models.py:1785 models.py:2023 models.py:2301 models.py:2507
-#: models.py:2616 models.py:3016 templates/ishtar/import_list.html:13
+#: forms_common.py:378 forms_common.py:448 models.py:1159 models.py:1555
+#: models.py:1824 models.py:1840 models.py:2078 models.py:2356 models.py:2562
+#: models.py:2671 models.py:3071 templates/ishtar/import_list.html:13
#: templates/ishtar/sheet_organization.html:8
#: templates/ishtar/sheet_organization.html:21
msgid "Name"
msgstr ""
-#: forms_common.py:176 models.py:1722 models.py:2154
+#: forms_common.py:176 models.py:1777 models.py:2209
msgid "Organization type"
msgstr ""
-#: forms_common.py:178 forms_common.py:402 models.py:1562
+#: forms_common.py:178 forms_common.py:402 models.py:1617
#: templates/ishtar/sheet_organization.html:10
msgid "Address"
msgstr ""
-#: forms_common.py:180 forms_common.py:405 models.py:1563
+#: forms_common.py:180 forms_common.py:405 models.py:1618
#: templates/ishtar/sheet_organization.html:11
msgid "Address complement"
msgstr ""
-#: forms_common.py:182 forms_common.py:406 models.py:1565
+#: forms_common.py:182 forms_common.py:406 models.py:1620
#: templates/ishtar/sheet_organization.html:12
msgid "Postal code"
msgstr ""
-#: forms_common.py:185 forms_common.py:409 models.py:1568
+#: forms_common.py:185 forms_common.py:409 models.py:1623
msgid "Country"
msgstr ""
#: forms_common.py:187 forms_common.py:326 forms_common.py:382
-#: forms_common.py:450 forms_common.py:574 models.py:1595
+#: forms_common.py:450 forms_common.py:574 models.py:1650
msgid "Email"
msgstr ""
-#: forms_common.py:188 forms_common.py:385 models.py:1580
+#: forms_common.py:188 forms_common.py:385 models.py:1635
#: templates/ishtar/sheet_organization.html:14
#: templates/ishtar/sheet_person.html:21
#: templates/ishtar/wizard/wizard_person.html:17
msgid "Phone"
msgstr ""
-#: forms_common.py:189 forms_common.py:394 models.py:1592
+#: forms_common.py:189 forms_common.py:394 models.py:1647
#: templates/ishtar/sheet_organization.html:15
#: templates/ishtar/sheet_person.html:39
#: templates/ishtar/wizard/wizard_person.html:35
msgid "Mobile phone"
msgstr ""
-#: forms_common.py:213 forms_common.py:327 forms_common.py:451 models.py:2192
-#: models.py:2509 models.py:2951 templates/sheet_ope.html:85
+#: forms_common.py:213 forms_common.py:327 forms_common.py:451 models.py:2247
+#: models.py:2564 models.py:3006 templates/sheet_ope.html:85
#: templates/sheet_ope.html.py:105 templates/sheet_ope.html:126
#: templates/ishtar/import_list.html:14
#: templates/ishtar/sheet_organization.html:23
@@ -274,7 +274,7 @@ msgstr ""
msgid "Type"
msgstr ""
-#: forms_common.py:222 views.py:147
+#: forms_common.py:222 views.py:149
msgid "Organization search"
msgstr ""
@@ -290,12 +290,12 @@ msgstr ""
msgid "Organization to merge"
msgstr ""
-#: forms_common.py:325 forms_common.py:376 forms_common.py:449 models.py:2614
+#: forms_common.py:325 forms_common.py:376 forms_common.py:449 models.py:2669
#: templates/ishtar/sheet_organization.html:22
msgid "Surname"
msgstr ""
-#: forms_common.py:341 forms_common.py:436 views.py:112
+#: forms_common.py:341 forms_common.py:436 views.py:114
msgid "Person search"
msgstr ""
@@ -308,25 +308,25 @@ msgstr ""
msgid "Identity"
msgstr ""
-#: forms_common.py:373 forms_common.py:781 forms_common.py:830 models.py:2155
-#: models.py:2608 models.py:2610 models.py:2948 templates/sheet_ope.html:104
+#: forms_common.py:373 forms_common.py:781 forms_common.py:830 models.py:2210
+#: models.py:2663 models.py:2665 models.py:3003 templates/sheet_ope.html:104
#: templates/ishtar/blocks/window_tables/documents.html:7
msgid "Title"
msgstr ""
-#: forms_common.py:374 models.py:2612
+#: forms_common.py:374 models.py:2667
msgid "Salutation"
msgstr ""
-#: forms_common.py:380 models.py:2618
+#: forms_common.py:380 models.py:2673
msgid "Raw name"
msgstr ""
-#: forms_common.py:383 models.py:1581
+#: forms_common.py:383 models.py:1636
msgid "Phone description"
msgstr ""
-#: forms_common.py:386 models.py:1583 models.py:1585
+#: forms_common.py:386 models.py:1638 models.py:1640
msgid "Phone description 2"
msgstr ""
@@ -334,11 +334,11 @@ msgstr ""
msgid "Phone 2"
msgstr ""
-#: forms_common.py:390 models.py:1589
+#: forms_common.py:390 models.py:1644
msgid "Phone description 3"
msgstr ""
-#: forms_common.py:392 models.py:1587
+#: forms_common.py:392 models.py:1642
msgid "Phone 3"
msgstr ""
@@ -346,23 +346,23 @@ msgstr ""
msgid "Current organization"
msgstr ""
-#: forms_common.py:411 models.py:1570
+#: forms_common.py:411 models.py:1625
msgid "Other address: address"
msgstr ""
-#: forms_common.py:414 models.py:1573
+#: forms_common.py:414 models.py:1628
msgid "Other address: address complement"
msgstr ""
-#: forms_common.py:416 models.py:1574
+#: forms_common.py:416 models.py:1629
msgid "Other address: postal code"
msgstr ""
-#: forms_common.py:418 models.py:1576
+#: forms_common.py:418 models.py:1631
msgid "Other address: town"
msgstr ""
-#: forms_common.py:420 models.py:1578
+#: forms_common.py:420 models.py:1633
msgid "Other address: country"
msgstr ""
@@ -378,7 +378,7 @@ msgstr ""
msgid "Account search"
msgstr ""
-#: forms_common.py:512 forms_common.py:552 forms_common.py:556 models.py:2561
+#: forms_common.py:512 forms_common.py:552 forms_common.py:556 models.py:2616
msgid "Person type"
msgstr ""
@@ -410,7 +410,7 @@ msgstr ""
msgid "Send the new password by email?"
msgstr ""
-#: forms_common.py:636 forms_common.py:649 models.py:3031
+#: forms_common.py:636 forms_common.py:649 models.py:3086
msgid "Towns"
msgstr ""
@@ -426,7 +426,7 @@ msgstr ""
msgid "Documentation informations"
msgstr ""
-#: forms_common.py:783 forms_common.py:831 models.py:2156 models.py:2923
+#: forms_common.py:783 forms_common.py:831 models.py:2211 models.py:2978
msgid "Source type"
msgstr ""
@@ -438,37 +438,37 @@ msgstr ""
msgid "Internal reference"
msgstr ""
-#: forms_common.py:791 models.py:2962
+#: forms_common.py:791 models.py:3017
msgid "Numerical ressource (web address)"
msgstr ""
-#: forms_common.py:792 models.py:2964
+#: forms_common.py:792 models.py:3019
msgid "Receipt date"
msgstr ""
-#: forms_common.py:794 models.py:2327 models.py:2966
+#: forms_common.py:794 models.py:2382 models.py:3021
msgid "Creation date"
msgstr ""
-#: forms_common.py:797 models.py:2969
+#: forms_common.py:797 models.py:3024
msgid "Receipt date in documentation"
msgstr ""
-#: forms_common.py:799 forms_common.py:835 models.py:381 models.py:698
-#: models.py:2050 models.py:2622 models.py:2976
+#: forms_common.py:799 forms_common.py:835 models.py:419 models.py:746
+#: models.py:2105 models.py:2677 models.py:3031
msgid "Comment"
msgstr ""
-#: forms_common.py:801 forms_common.py:834 models.py:1111 models.py:1789
-#: models.py:1977 models.py:2024 models.py:2975 templates/sheet_ope.html:128
+#: forms_common.py:801 forms_common.py:834 models.py:1161 models.py:1844
+#: models.py:2032 models.py:2079 models.py:3030 templates/sheet_ope.html:128
msgid "Description"
msgstr ""
-#: forms_common.py:804 models.py:2977
+#: forms_common.py:804 models.py:3032
msgid "Additional information"
msgstr ""
-#: forms_common.py:806 forms_common.py:838 models.py:2979
+#: forms_common.py:806 forms_common.py:838 models.py:3034
msgid "Has a duplicate"
msgstr ""
@@ -483,7 +483,7 @@ msgid ""
"p>"
msgstr ""
-#: forms_common.py:827 forms_common.py:856 forms_common.py:890 models.py:2890
+#: forms_common.py:827 forms_common.py:856 forms_common.py:890 models.py:2945
#: templates/ishtar/wizard/wizard_person_deletion.html:124
msgid "Author"
msgstr ""
@@ -496,7 +496,7 @@ msgstr ""
msgid "Would you like to delete this documentation?"
msgstr ""
-#: forms_common.py:864 models.py:2157 models.py:2877 models.py:2887
+#: forms_common.py:864 models.py:2212 models.py:2932 models.py:2942
msgid "Author type"
msgstr ""
@@ -508,7 +508,7 @@ msgstr ""
msgid "There are identical authors."
msgstr ""
-#: forms_common.py:901 models.py:2891 models.py:2958
+#: forms_common.py:901 models.py:2946 models.py:3013
#: templates/sheet_ope.html:106
#: templates/ishtar/blocks/window_tables/documents.html:9
msgid "Authors"
@@ -526,7 +526,7 @@ msgstr ""
msgid "Deletion"
msgstr ""
-#: ishtar_menu.py:39 models.py:1283 views.py:1644
+#: ishtar_menu.py:39 models.py:1338 views.py:1640
msgid "Global variables"
msgstr ""
@@ -554,278 +554,296 @@ msgstr ""
msgid "Manual merge"
msgstr ""
-#: ishtar_menu.py:109 models.py:2335
+#: ishtar_menu.py:109 models.py:2390
msgid "Imports"
msgstr ""
-#: ishtar_menu.py:112 views.py:1652
+#: ishtar_menu.py:112 views.py:1648
msgid "New import"
msgstr ""
-#: ishtar_menu.py:116 views.py:1666
+#: ishtar_menu.py:116 views.py:1662
msgid "Current imports"
msgstr ""
-#: ishtar_menu.py:120 views.py:1705
+#: ishtar_menu.py:120 views.py:1701
msgid "Old imports"
msgstr ""
-#: models.py:186
+#: models.py:224
msgid "Not a valid item."
msgstr ""
-#: models.py:201
+#: models.py:239
msgid "A selected item is not a valid item."
msgstr ""
-#: models.py:212
+#: models.py:250
msgid "This item already exists."
msgstr ""
-#: models.py:377 models.py:697 models.py:1535 models.py:1547 models.py:1973
+#: models.py:415 models.py:745 models.py:1590 models.py:1602 models.py:2028
msgid "Label"
msgstr ""
-#: models.py:379
+#: models.py:417
msgid "Textual ID"
msgstr ""
-#: models.py:382 models.py:700 models.py:1504
+#: models.py:420 models.py:748 models.py:1559
msgid "Available"
msgstr ""
-#: models.py:724 models.py:2096
+#: models.py:772 models.py:2151
msgid "Key"
msgstr ""
-#: models.py:730
+#: models.py:778
msgid "Specific key to an import"
msgstr ""
-#: models.py:826
+#: models.py:874
msgid "Last editor"
msgstr ""
-#: models.py:829
+#: models.py:877
msgid "Creator"
msgstr ""
-#: models.py:971 models.py:2874 models.py:3042 models.py:3098
+#: models.py:1019 models.py:2929 models.py:3097 models.py:3153
msgid "Order"
msgstr ""
-#: models.py:972
+#: models.py:1020
msgid "Symmetrical"
msgstr ""
-#: models.py:973
+#: models.py:1021
msgid "Tiny label"
msgstr ""
-#: models.py:987
+#: models.py:1035
msgid "Cannot have symmetrical and an inverse_relation"
msgstr ""
-#: models.py:1103
+#: models.py:1151
msgid "Euro"
msgstr ""
-#: models.py:1104
+#: models.py:1152
msgid "US dollar"
msgstr ""
-#: models.py:1110 models.py:1787
+#: models.py:1153 views.py:1438 views.py:1500
+msgid "Operations"
+msgstr ""
+
+#: models.py:1154 views.py:1440 views.py:1504
+msgid "Context records"
+msgstr ""
+
+#: models.py:1160 models.py:1842
msgid "Slug"
msgstr ""
-#: models.py:1113
+#: models.py:1163
msgid "CSS color code for base module"
msgstr ""
-#: models.py:1115
+#: models.py:1165
msgid "Files module"
msgstr ""
-#: models.py:1117
+#: models.py:1167
msgid "CSS color code for files module"
msgstr ""
-#: models.py:1119
+#: models.py:1169
msgid "Context records module"
msgstr ""
-#: models.py:1122
+#: models.py:1172
msgid "CSS color code for context record module"
msgstr ""
-#: models.py:1124
+#: models.py:1174
msgid "Finds module"
msgstr ""
-#: models.py:1125
+#: models.py:1175
msgid "Need context records module"
msgstr ""
-#: models.py:1127
+#: models.py:1177
+msgid "Find index is based on"
+msgstr ""
+
+#: models.py:1179
+msgid ""
+"To prevent irrelevant indexes, change this parameter only if there is no "
+"find in the database"
+msgstr ""
+
+#: models.py:1182
msgid "CSS color code for find module"
msgstr ""
-#: models.py:1130
+#: models.py:1185
msgid "Warehouses module"
msgstr ""
-#: models.py:1131
+#: models.py:1186
msgid "Need finds module"
msgstr ""
-#: models.py:1133
+#: models.py:1188
msgid "CSS code for warehouse module"
msgstr ""
-#: models.py:1135
+#: models.py:1190
msgid "Mapping module"
msgstr ""
-#: models.py:1137
+#: models.py:1192
msgid "CSS code for mapping module"
msgstr ""
-#: models.py:1140
+#: models.py:1195
msgid "Home page"
msgstr ""
-#: models.py:1141
+#: models.py:1196
#, python-brace-format
msgid ""
"Homepage of Ishtar - if not defined a default homepage will appear. Use the "
"markdown syntax. {random_image} can be used to display a random image."
msgstr ""
-#: models.py:1145
+#: models.py:1200
msgid "File external id"
msgstr ""
-#: models.py:1147
+#: models.py:1202
msgid ""
"Formula to manage file external ID. Change this with care. With incorrect "
"formula, the application might be unusable and import of external data can "
"be destructive."
msgstr ""
-#: models.py:1152
+#: models.py:1207
msgid "Parcel external id"
msgstr ""
-#: models.py:1155
+#: models.py:1210
msgid ""
"Formula to manage parcel external ID. Change this with care. With incorrect "
"formula, the application might be unusable and import of external data can "
"be destructive."
msgstr ""
-#: models.py:1160
+#: models.py:1215
msgid "Context record external id"
msgstr ""
-#: models.py:1162
+#: models.py:1217
msgid ""
"Formula to manage context record external ID. Change this with care. With "
"incorrect formula, the application might be unusable and import of external "
"data can be destructive."
msgstr ""
-#: models.py:1167
+#: models.py:1222
msgid "Base find external id"
msgstr ""
-#: models.py:1169
+#: models.py:1224
msgid ""
"Formula to manage base find external ID. Change this with care. With "
"incorrect formula, the application might be unusable and import of external "
"data can be destructive."
msgstr ""
-#: models.py:1174
+#: models.py:1229
msgid "Find external id"
msgstr ""
-#: models.py:1176
+#: models.py:1231
msgid ""
"Formula to manage find external ID. Change this with care. With incorrect "
"formula, the application might be unusable and import of external data can "
"be destructive."
msgstr ""
-#: models.py:1181
+#: models.py:1236
msgid "Container external id"
msgstr ""
-#: models.py:1183
+#: models.py:1238
msgid ""
"Formula to manage container external ID. Change this with care. With "
"incorrect formula, the application might be unusable and import of external "
"data can be destructive."
msgstr ""
-#: models.py:1188
+#: models.py:1243
msgid "Warehouse external id"
msgstr ""
-#: models.py:1190
+#: models.py:1245
msgid ""
"Formula to manage warehouse external ID. Change this with care. With "
"incorrect formula, the application might be unusable and import of external "
"data can be destructive."
msgstr ""
-#: models.py:1195
+#: models.py:1250
msgid "Raw name for person"
msgstr ""
-#: models.py:1197
+#: models.py:1252
msgid ""
"Formula to manage person raw_name. Change this with care. With incorrect "
"formula, the application might be unusable and import of external data can "
"be destructive."
msgstr ""
-#: models.py:1201
+#: models.py:1256
msgid "Current active"
msgstr ""
-#: models.py:1202
+#: models.py:1257
msgid "Currency"
msgstr ""
-#: models.py:1206
+#: models.py:1261
msgid "Ishtar site profile"
msgstr ""
-#: models.py:1207
+#: models.py:1262
msgid "Ishtar site profiles"
msgstr ""
-#: models.py:1276
+#: models.py:1331
msgid "Variable name"
msgstr ""
-#: models.py:1277
+#: models.py:1332
msgid "Description of the variable"
msgstr ""
-#: models.py:1279 models.py:2097
+#: models.py:1334 models.py:2152
msgid "Value"
msgstr ""
-#: models.py:1282
+#: models.py:1337
msgid "Global variable"
msgstr ""
-#: models.py:1405 models.py:1435
+#: models.py:1460 models.py:1490
msgid "Total"
msgstr ""
-#: models.py:1412 models.py:1536 models.py:1548
+#: models.py:1467 models.py:1591 models.py:1603
#: templates/ishtar/sheet_person.html:24
#: templates/ishtar/dashboards/dashboard_main_detail.html:141
#: templates/ishtar/dashboards/dashboard_main_detail_users.html:26
@@ -833,663 +851,663 @@ msgstr ""
msgid "Number"
msgstr ""
-#: models.py:1499
+#: models.py:1554
msgid "Administrative Act"
msgstr ""
-#: models.py:1503
+#: models.py:1558
msgid "Associated object"
msgstr ""
-#: models.py:1507
+#: models.py:1562
msgid "Document template"
msgstr ""
-#: models.py:1508
+#: models.py:1563
msgid "Document templates"
msgstr ""
-#: models.py:1539 models.py:1549 models.py:2321
+#: models.py:1594 models.py:1604 models.py:2376
msgid "State"
msgstr ""
-#: models.py:1553 templates/blocks/JQueryAdvancedTown.html:12
+#: models.py:1608 templates/blocks/JQueryAdvancedTown.html:12
msgid "Department"
msgstr ""
-#: models.py:1554
+#: models.py:1609
msgid "Departments"
msgstr ""
-#: models.py:1591
+#: models.py:1646
msgid "Raw phone"
msgstr ""
-#: models.py:1597
+#: models.py:1652
msgid "Alternative address is prefered"
msgstr ""
-#: models.py:1636
+#: models.py:1691
msgid "Tel: "
msgstr ""
-#: models.py:1640
+#: models.py:1695
msgid "Mobile: "
msgstr ""
-#: models.py:1644
+#: models.py:1699
msgid "Email: "
msgstr ""
-#: models.py:1649
+#: models.py:1704
msgid "Merge key"
msgstr ""
-#: models.py:1723
+#: models.py:1778
msgid "Organization types"
msgstr ""
-#: models.py:1770
+#: models.py:1825
msgid "Class name"
msgstr ""
-#: models.py:1773
+#: models.py:1828
msgid "Importer - Model"
msgstr ""
-#: models.py:1774
+#: models.py:1829
msgid "Importer - Models"
msgstr ""
-#: models.py:1791 templates/ishtar/dashboards/dashboard_main.html:34
+#: models.py:1846 templates/ishtar/dashboards/dashboard_main.html:34
msgid "Users"
msgstr ""
-#: models.py:1794
+#: models.py:1849
msgid "Associated model"
msgstr ""
-#: models.py:1797
+#: models.py:1852
msgid "Models that can accept new items"
msgstr ""
-#: models.py:1798
+#: models.py:1853
msgid "Leave blank for no restrictions"
msgstr ""
-#: models.py:1800
+#: models.py:1855
msgid "Is template"
msgstr ""
-#: models.py:1801
+#: models.py:1856
msgid "Unicity keys (separator \";\")"
msgstr ""
-#: models.py:1805
+#: models.py:1860
msgid "Importer - Type"
msgstr ""
-#: models.py:1806
+#: models.py:1861
msgid "Importer - Types"
msgstr ""
-#: models.py:1905
+#: models.py:1960
msgid "Importer - Default"
msgstr ""
-#: models.py:1906
+#: models.py:1961
msgid "Importer - Defaults"
msgstr ""
-#: models.py:1941
+#: models.py:1996
msgid "Importer - Default value"
msgstr ""
-#: models.py:1942
+#: models.py:1997
msgid "Importer - Default values"
msgstr ""
-#: models.py:1976
+#: models.py:2031
msgid "Column number"
msgstr ""
-#: models.py:1979
+#: models.py:2034
msgid "Required"
msgstr ""
-#: models.py:1981
+#: models.py:2036
msgid "Export field name"
msgstr ""
-#: models.py:1982
+#: models.py:2037
msgid ""
"Fill this field if the field name is ambiguous for export. For instance: "
"concatenated fields."
msgstr ""
-#: models.py:1987
+#: models.py:2042
msgid "Importer - Column"
msgstr ""
-#: models.py:1988
+#: models.py:2043
msgid "Importer - Columns"
msgstr ""
-#: models.py:2008
+#: models.py:2063
msgid "Field name"
msgstr ""
-#: models.py:2010 models.py:2044
+#: models.py:2065 models.py:2099
msgid "Force creation of new items"
msgstr ""
-#: models.py:2012 models.py:2046
+#: models.py:2067 models.py:2101
msgid "Concatenate with existing"
msgstr ""
-#: models.py:2014 models.py:2048
+#: models.py:2069 models.py:2103
msgid "Concatenate character"
msgstr ""
-#: models.py:2018
+#: models.py:2073
msgid "Importer - Duplicate field"
msgstr ""
-#: models.py:2019
+#: models.py:2074
msgid "Importer - Duplicate fields"
msgstr ""
-#: models.py:2026
+#: models.py:2081
msgid "Regular expression"
msgstr ""
-#: models.py:2029
+#: models.py:2084
msgid "Importer - Regular expression"
msgstr ""
-#: models.py:2030
+#: models.py:2085
msgid "Importer - Regular expressions"
msgstr ""
-#: models.py:2053
+#: models.py:2108
msgid "Importer - Target"
msgstr ""
-#: models.py:2054
+#: models.py:2109
msgid "Importer - Targets"
msgstr ""
-#: models.py:2078 views.py:568
+#: models.py:2133 views.py:570
msgid "True"
msgstr ""
-#: models.py:2079 views.py:570
+#: models.py:2134 views.py:572
msgid "False"
msgstr ""
-#: models.py:2098
+#: models.py:2153
msgid "Is set"
msgstr ""
-#: models.py:2105
+#: models.py:2160
msgid "Importer - Target key"
msgstr ""
-#: models.py:2106
+#: models.py:2161
msgid "Importer - Targets keys"
msgstr ""
-#: models.py:2158 models.py:2954
+#: models.py:2213 models.py:3009
msgid "Format"
msgstr ""
-#: models.py:2159 models.py:3046
+#: models.py:2214 models.py:3101
msgid "Operation type"
msgstr ""
-#: models.py:2160
+#: models.py:2215
msgid "Period"
msgstr ""
-#: models.py:2161
+#: models.py:2216
msgid "Report state"
msgstr ""
-#: models.py:2162
+#: models.py:2217
msgid "Remain type"
msgstr ""
-#: models.py:2163
+#: models.py:2218
msgid "Unit"
msgstr ""
-#: models.py:2165
+#: models.py:2220
msgid "Activity type"
msgstr ""
-#: models.py:2166
+#: models.py:2221
msgid "Material"
msgstr ""
-#: models.py:2168
+#: models.py:2223
msgid "Conservatory state"
msgstr ""
-#: models.py:2169
+#: models.py:2224
msgid "Container type"
msgstr ""
-#: models.py:2170
+#: models.py:2225
msgid "Preservation type"
msgstr ""
-#: models.py:2171
+#: models.py:2226
msgid "Object type"
msgstr ""
-#: models.py:2172
+#: models.py:2227
msgid "Integrity type"
msgstr ""
-#: models.py:2174
+#: models.py:2229
msgid "Remarkability type"
msgstr ""
-#: models.py:2175
+#: models.py:2230
msgid "Batch type"
msgstr ""
-#: models.py:2177
+#: models.py:2232
msgid "Identification type"
msgstr ""
-#: models.py:2179
+#: models.py:2234
msgid "Context record relation type"
msgstr ""
-#: models.py:2180 models.py:3104
+#: models.py:2235 models.py:3159
msgid "Spatial reference system"
msgstr ""
-#: models.py:2181 models.py:2932
+#: models.py:2236 models.py:2987
msgid "Support type"
msgstr ""
-#: models.py:2182 models.py:2573
+#: models.py:2237 models.py:2628
msgid "Title type"
msgstr ""
-#: models.py:2188
+#: models.py:2243
msgid "Integer"
msgstr ""
-#: models.py:2189
+#: models.py:2244
msgid "Float"
msgstr ""
-#: models.py:2190
+#: models.py:2245
msgid "String"
msgstr ""
-#: models.py:2191 templates/sheet_ope.html:86
+#: models.py:2246 templates/sheet_ope.html:86
msgid "Date"
msgstr ""
-#: models.py:2193 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83
+#: models.py:2248 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83
#: templates/ishtar/dashboards/dashboard_main_detail.html:126
msgid "Year"
msgstr ""
-#: models.py:2194
+#: models.py:2249
msgid "String to boolean"
msgstr ""
-#: models.py:2195
+#: models.py:2250
msgctxt "filesystem"
msgid "File"
msgstr ""
-#: models.py:2196
+#: models.py:2251
msgid "Unknow type"
msgstr ""
-#: models.py:2212
+#: models.py:2267
msgid "4 digit year. e.g.: \"2015\""
msgstr ""
-#: models.py:2213
+#: models.py:2268
msgid "4 digit year/month/day. e.g.: \"2015/02/04\""
msgstr ""
-#: models.py:2214
+#: models.py:2269
msgid "Day/month/4 digit year. e.g.: \"04/02/2015\""
msgstr ""
-#: models.py:2224
+#: models.py:2279
msgid "Options"
msgstr ""
-#: models.py:2226
+#: models.py:2281
msgid "Split character(s)"
msgstr ""
-#: models.py:2230
+#: models.py:2285
msgid "Importer - Formater type"
msgstr ""
-#: models.py:2231
+#: models.py:2286
msgid "Importer - Formater types"
msgstr ""
-#: models.py:2283 templates/ishtar/dashboards/dashboard_main_detail.html:63
+#: models.py:2338 templates/ishtar/dashboards/dashboard_main_detail.html:63
msgid "Created"
msgstr ""
-#: models.py:2284
+#: models.py:2339
msgid "Analyse in progress"
msgstr ""
-#: models.py:2285
+#: models.py:2340
msgid "Analysed"
msgstr ""
-#: models.py:2286
+#: models.py:2341
msgid "Import pending"
msgstr ""
-#: models.py:2287
+#: models.py:2342
msgid "Import in progress"
msgstr ""
-#: models.py:2288
+#: models.py:2343
msgid "Finished with errors"
msgstr ""
-#: models.py:2289
+#: models.py:2344
msgid "Finished"
msgstr ""
-#: models.py:2290
+#: models.py:2345
msgid "Archived"
msgstr ""
-#: models.py:2305
+#: models.py:2360
msgid "Imported file"
msgstr ""
-#: models.py:2307
+#: models.py:2362
msgid "Associated images (zip file)"
msgstr ""
-#: models.py:2309
+#: models.py:2364
msgid "Encoding"
msgstr ""
-#: models.py:2311
+#: models.py:2366
msgid "Skip lines"
msgstr ""
-#: models.py:2312 templates/ishtar/import_list.html:51
+#: models.py:2367 templates/ishtar/import_list.html:51
msgid "Error file"
msgstr ""
-#: models.py:2315
+#: models.py:2370
msgid "Result file"
msgstr ""
-#: models.py:2318 templates/ishtar/import_list.html:57
+#: models.py:2373 templates/ishtar/import_list.html:57
msgid "Match file"
msgstr ""
-#: models.py:2324
+#: models.py:2379
msgid "Conservative import"
msgstr ""
-#: models.py:2328
+#: models.py:2383
msgid "End date"
msgstr ""
-#: models.py:2331
+#: models.py:2386
msgid "Remaining seconds"
msgstr ""
-#: models.py:2334
+#: models.py:2389
msgid "Import"
msgstr ""
-#: models.py:2363
+#: models.py:2418
msgid "Analyse"
msgstr ""
-#: models.py:2365 models.py:2368
+#: models.py:2420 models.py:2423
msgid "Re-analyse"
msgstr ""
-#: models.py:2366
+#: models.py:2421
msgid "Launch import"
msgstr ""
-#: models.py:2369
+#: models.py:2424
msgid "Re-import"
msgstr ""
-#: models.py:2370
+#: models.py:2425
msgid "Archive"
msgstr ""
-#: models.py:2372
+#: models.py:2427
msgid "Unarchive"
msgstr ""
-#: models.py:2373 widgets.py:184 templates/ishtar/form_delete.html:11
+#: models.py:2428 widgets.py:184 templates/ishtar/form_delete.html:11
msgid "Delete"
msgstr ""
-#: models.py:2514
+#: models.py:2569
msgid "Organizations"
msgstr ""
-#: models.py:2516
+#: models.py:2571
msgid "Can view all Organizations"
msgstr ""
-#: models.py:2517
+#: models.py:2572
msgid "Can view own Organization"
msgstr ""
-#: models.py:2518
+#: models.py:2573
msgid "Can add own Organization"
msgstr ""
-#: models.py:2520
+#: models.py:2575
msgid "Can change own Organization"
msgstr ""
-#: models.py:2522
+#: models.py:2577
msgid "Can delete own Organization"
msgstr ""
-#: models.py:2557
+#: models.py:2612
msgid "Groups"
msgstr ""
-#: models.py:2562
+#: models.py:2617
msgid "Person types"
msgstr ""
-#: models.py:2574
+#: models.py:2629
msgid "Title types"
msgstr ""
-#: models.py:2583
+#: models.py:2638
msgid "Mr"
msgstr ""
-#: models.py:2584
+#: models.py:2639
msgid "Miss"
msgstr ""
-#: models.py:2585
+#: models.py:2640
msgid "Mr and Mrs"
msgstr ""
-#: models.py:2586
+#: models.py:2641
msgid "Mrs"
msgstr ""
-#: models.py:2587
+#: models.py:2642
msgid "Doctor"
msgstr ""
-#: models.py:2620
+#: models.py:2675
msgid "Contact type"
msgstr ""
-#: models.py:2623 models.py:2687
+#: models.py:2678 models.py:2742
msgid "Types"
msgstr ""
-#: models.py:2626
+#: models.py:2681
msgid "Is attached to"
msgstr ""
-#: models.py:2631
+#: models.py:2686
msgid "Persons"
msgstr ""
-#: models.py:2633
+#: models.py:2688
msgid "Can view all Persons"
msgstr ""
-#: models.py:2634
+#: models.py:2689
msgid "Can view own Person"
msgstr ""
-#: models.py:2635
+#: models.py:2690
msgid "Can add own Person"
msgstr ""
-#: models.py:2636
+#: models.py:2691
msgid "Can change own Person"
msgstr ""
-#: models.py:2637
+#: models.py:2692
msgid "Can delete own Person"
msgstr ""
-#: models.py:2826
+#: models.py:2881
msgid "Advanced shortcut menu"
msgstr ""
-#: models.py:2829
+#: models.py:2884
msgid "Ishtar user"
msgstr ""
-#: models.py:2830
+#: models.py:2885
msgid "Ishtar users"
msgstr ""
-#: models.py:2870
+#: models.py:2925
msgid "To modify the password use the form in Auth > User"
msgstr ""
-#: models.py:2878
+#: models.py:2933
msgid "Author types"
msgstr ""
-#: models.py:2895
+#: models.py:2950
msgid "Can view all Authors"
msgstr ""
-#: models.py:2897
+#: models.py:2952
msgid "Can view own Author"
msgstr ""
-#: models.py:2899
+#: models.py:2954
msgid "Can add own Author"
msgstr ""
-#: models.py:2901
+#: models.py:2956
msgid "Can change own Author"
msgstr ""
-#: models.py:2903
+#: models.py:2958
msgid "Can delete own Author"
msgstr ""
-#: models.py:2924
+#: models.py:2979
msgid "Source types"
msgstr ""
-#: models.py:2933
+#: models.py:2988
msgid "Support types"
msgstr ""
-#: models.py:2940
+#: models.py:2995
msgid "Format type"
msgstr ""
-#: models.py:2941
+#: models.py:2996
msgid "Format types"
msgstr ""
-#: models.py:2949
+#: models.py:3004
msgid "External ID"
msgstr ""
-#: models.py:2952
+#: models.py:3007
msgid "Support"
msgstr ""
-#: models.py:2956
+#: models.py:3011
msgid "Scale"
msgstr ""
-#: models.py:2970
+#: models.py:3025
msgid "Item number"
msgstr ""
-#: models.py:2971
+#: models.py:3026
msgid "Ref."
msgstr ""
-#: models.py:2974
+#: models.py:3029
msgid "Internal ref."
msgstr ""
-#: models.py:3017
+#: models.py:3072
msgid "Surface (m2)"
msgstr ""
-#: models.py:3018 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107
+#: models.py:3073 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107
msgid "Localisation"
msgstr ""
-#: models.py:3043
+#: models.py:3098
msgid "Is preventive"
msgstr ""
-#: models.py:3047
+#: models.py:3102
msgid "Operation types"
msgstr ""
-#: models.py:3076
+#: models.py:3131
msgid "Preventive"
msgstr ""
-#: models.py:3077
+#: models.py:3132
msgid "Research"
msgstr ""
-#: models.py:3100
+#: models.py:3155
msgid "Authority name"
msgstr ""
-#: models.py:3101
+#: models.py:3156
msgid "Authority SRID"
msgstr ""
-#: models.py:3105
+#: models.py:3160
msgid "Spatial reference systems"
msgstr ""
@@ -1501,120 +1519,112 @@ msgstr ""
msgid "Load another random image?"
msgstr ""
-#: views.py:119
+#: views.py:121
msgid "New person"
msgstr ""
-#: views.py:127
+#: views.py:129
msgid "Person modification"
msgstr ""
-#: views.py:142
+#: views.py:144
msgid "Person deletion"
msgstr ""
-#: views.py:153
+#: views.py:155
msgid "New organization"
msgstr ""
-#: views.py:160
+#: views.py:162
msgid "Organization modification"
msgstr ""
-#: views.py:176
+#: views.py:178
msgid "Organization deletion"
msgstr ""
-#: views.py:183
+#: views.py:185
msgid "Account management"
msgstr ""
-#: views.py:189
+#: views.py:191
msgid "Account deletion"
msgstr ""
-#: views.py:251
+#: views.py:253
msgid "Archaeological file"
msgstr ""
-#: views.py:252
+#: views.py:254
msgid "Operation"
msgstr ""
-#: views.py:254
+#: views.py:256
msgid "Context record"
msgstr ""
-#: views.py:256
+#: views.py:258
msgid "Find"
msgstr ""
-#: views.py:258
+#: views.py:260
msgid "Treatment request"
msgstr ""
-#: views.py:259
+#: views.py:261
msgid "Treatment"
msgstr ""
-#: views.py:1387 views.py:1430
+#: views.py:1376 views.py:1419
msgid "Operation not permitted."
msgstr ""
-#: views.py:1389
+#: views.py:1378
#, python-format
msgid "New %s"
msgstr ""
-#: views.py:1448 views.py:1501
+#: views.py:1437 views.py:1496
msgid "Archaeological files"
msgstr ""
-#: views.py:1449 views.py:1505
-msgid "Operations"
-msgstr ""
-
-#: views.py:1451 views.py:1509
-msgid "Context records"
-msgstr ""
-
-#: views.py:1453 views.py:1512
+#: views.py:1442 views.py:1507
msgid "Finds"
msgstr ""
-#: views.py:1455 views.py:1517
+#: views.py:1444 views.py:1512
msgid "Treatment requests"
msgstr ""
-#: views.py:1456 views.py:1521
+#: views.py:1445 views.py:1518
msgid "Treatments"
msgstr ""
-#: views.py:1719 templates/ishtar/import_list.html:47
+#: views.py:1715 templates/ishtar/import_list.html:47
msgid "Link unmatched items"
msgstr ""
-#: views.py:1734
+#: views.py:1730
msgid "Delete import"
msgstr ""
-#: views.py:1773
+#: views.py:1769
msgid "Merge persons"
msgstr ""
-#: views.py:1797
+#: views.py:1793
msgid "Select the main person"
msgstr ""
-#: views.py:1806
+#: views.py:1802
msgid "Merge organization"
msgstr ""
-#: views.py:1816
+#: views.py:1812
msgid "Select the main organization"
msgstr ""
-#: views.py:1856 views.py:1872
+#: views.py:1852 views.py:1868
msgid "Corporation manager"
msgstr ""
diff --git a/ishtar_common/management/commands/export_access_controls.py b/ishtar_common/management/commands/export_access_controls.py
new file mode 100644
index 000000000..87b4819b9
--- /dev/null
+++ b/ishtar_common/management/commands/export_access_controls.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# See the file COPYING for details.
+
+import json
+import sys
+
+from django.core.management.base import BaseCommand
+
+from django.contrib.auth.models import Permission, Group
+from django.contrib.contenttypes.models import ContentType
+from ishtar_common.models import PersonType
+
+
+class Command(BaseCommand):
+ args = ''
+ help = 'Export access controls'
+
+ def handle(self, *args, **options):
+ result = {
+ 'content_types': [],
+ 'permissions': [],
+ 'groups': [],
+ 'group_perms': [],
+ 'person_types': [],
+ 'person_type_groups': [],
+ }
+
+ dct_ct = {}
+ for content_type in ContentType.objects.all():
+ value = {'app_label': content_type.app_label,
+ 'model': content_type.model,
+ 'name': content_type.name
+ }
+ result['content_types'].append(value)
+ dct_ct[content_type.pk] = (content_type.app_label,
+ content_type.model)
+
+ dct_perm = {}
+ for perm in Permission.objects.all():
+ value = {'content_type': dct_ct[perm.content_type_id],
+ 'codename': perm.codename,
+ 'name': perm.name}
+ result['permissions'].append(value)
+ dct_perm[perm.pk] = perm.codename
+
+ dct_groups = {}
+ for grp in Group.objects.all():
+ value = {
+ "name": grp.name
+ }
+ result['groups'].append(value)
+ dct_groups[grp.pk] = grp
+ for perm in grp.permissions.all():
+ result['group_perms'].append(
+ {'group': grp.name, 'permission': dct_perm[perm.pk]})
+
+ dct_pts = {}
+ for pt in PersonType.objects.all():
+ value = {
+ "label": pt.label,
+ "txt_idx": pt.txt_idx,
+ "comment": pt.comment,
+ "available": pt.available
+ }
+ result["person_types"].append(value)
+ dct_pts[pt.pk] = pt.txt_idx
+ for ptgp in pt.groups.all():
+ result['person_type_groups'].append(
+ {"person_type": pt.txt_idx, "group": ptgp.name}
+ )
+
+ data = json.dumps(result)
+ sys.stdout.write(data) \ No newline at end of file
diff --git a/ishtar_common/management/commands/import_access_controls.py b/ishtar_common/management/commands/import_access_controls.py
new file mode 100644
index 000000000..62692485d
--- /dev/null
+++ b/ishtar_common/management/commands/import_access_controls.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# See the file COPYING for details.
+
+import json
+
+from django.core.management.base import BaseCommand
+
+from django.contrib.auth.models import Permission, Group
+from django.contrib.contenttypes.models import ContentType
+
+from ishtar_common.models import PersonType
+
+class Command(BaseCommand):
+ args = '<access control file>'
+ help = 'Import access controls'
+
+ def handle(self, *args, **options):
+ f = open(args[0])
+ data = json.loads(f.read())
+
+ res = {'content_types': {},
+ 'permissions': {},
+ 'groups': {},
+ 'person_types': {}
+ }
+ for content_type in data['content_types']:
+ q = ContentType.objects.filter(
+ app_label=content_type['app_label'],
+ model=content_type['model'])
+ if not q.count():
+ ct = ContentType.objects.create(
+ app_label=content_type['app_label'],
+ model=content_type['model'],
+ name=content_type['name']
+ )
+ print("created", ct)
+ else:
+ ct = q.all()[0]
+ res['content_types'][(ct.app_label,
+ ct.model)] = ct
+
+ for perm in data['permissions']:
+ app_label, model = perm['content_type']
+ q = Permission.objects.filter(
+ codename=perm['codename'],
+ content_type__app_label=app_label,
+ content_type__model= model
+ )
+ if q.count():
+ p = q.all()[0]
+ else:
+ p = Permission.objects.create(
+ name=perm['name'], codename=perm['codename'],
+ content_type=res['content_types'][(app_label, model)])
+ print("created", p)
+ res['permissions'][perm['codename']] = p
+
+ for gp in data['groups']:
+ q = Group.objects.filter(name=gp['name'])
+ if q.count():
+ g = q.all()[0]
+ else:
+ g = Group.objects.create(name=gp['name'])
+ print("created", g)
+ res['groups'][gp['name']] = g
+ g.permissions.clear()
+
+ for gperm in data['group_perms']:
+ g = res['groups'][gperm['group']]
+ g.permissions.add(res['permissions'][gperm['permission']])
+
+ for pt in data['person_types']:
+ q = PersonType.objects.filter(txt_idx=pt['txt_idx'])
+ if q.count():
+ pt = q.all()[0]
+ else:
+ pt = PersonType.objects.create(
+ label=pt['label'],
+ txt_idx=pt['txt_idx'],
+ comment=pt['comment'],
+ available=pt['available']
+ )
+ print("created", pt)
+ res['person_types'][pt.txt_idx] = pt
+ pt.groups.clear()
+
+ for ptgp in data['person_type_groups']:
+ pt = res['person_types'][ptgp['person_type']]
+ gp = res['groups'][ptgp['group']]
+ pt.groups.add(gp)
diff --git a/ishtar_common/migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py b/ishtar_common/migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py
new file mode 100644
index 000000000..84bf5f971
--- /dev/null
+++ b/ishtar_common/migrations/0076_auto__add_field_ishtarsiteprofile_find_index.py
@@ -0,0 +1,496 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'IshtarSiteProfile.find_index'
+ db.add_column('ishtar_common_ishtarsiteprofile', 'find_index',
+ self.gf('django.db.models.fields.CharField')(default='O', max_length=2),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'IshtarSiteProfile.find_index'
+ db.delete_column('ishtar_common_ishtarsiteprofile', 'find_index')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'ishtar_common.arrondissement': {
+ 'Meta': {'object_name': 'Arrondissement'},
+ 'department': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'ishtar_common.author': {
+ 'Meta': {'ordering': "('author_type__order', 'person__name')", 'object_name': 'Author'},
+ 'author_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.AuthorType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'author'", 'to': "orm['ishtar_common.Person']"})
+ },
+ 'ishtar_common.authortype': {
+ 'Meta': {'ordering': "['order', 'label']", 'object_name': 'AuthorType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.canton': {
+ 'Meta': {'object_name': 'Canton'},
+ 'arrondissement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Arrondissement']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'})
+ },
+ 'ishtar_common.department': {
+ 'Meta': {'ordering': "['number']", 'object_name': 'Department'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}),
+ 'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.State']", 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.documenttemplate': {
+ 'Meta': {'ordering': "['associated_object_name', 'name']", 'object_name': 'DocumentTemplate'},
+ 'associated_object_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'template': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
+ },
+ 'ishtar_common.format': {
+ 'Meta': {'ordering': "['label']", 'object_name': 'Format'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.formatertype': {
+ 'Meta': {'ordering': "('formater_type', 'options')", 'unique_together': "(('formater_type', 'options', 'many_split'),)", 'object_name': 'FormaterType'},
+ 'formater_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'many_split': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'options': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.globalvar': {
+ 'Meta': {'ordering': "['slug']", 'object_name': 'GlobalVar'},
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.historicalorganization': {
+ 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalOrganization'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'organization_type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.historicalperson': {
+ 'Meta': {'ordering': "('-history_date', '-history_id')", 'object_name': 'HistoricalPerson'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'attached_to_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'history_creator_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'history_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'history_id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'history_modifier_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'history_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'history_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'blank': 'True'}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'title_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.import': {
+ 'Meta': {'object_name': 'Import'},
+ 'conservative_import': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'encoding': ('django.db.models.fields.CharField', [], {'default': "'utf-8'", 'max_length': '15'}),
+ 'end_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'error_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imported_file': ('django.db.models.fields.files.FileField', [], {'max_length': '220'}),
+ 'imported_images': ('django.db.models.fields.files.FileField', [], {'max_length': '220', 'null': 'True', 'blank': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.ImporterType']"}),
+ 'match_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'result_file': ('django.db.models.fields.files.FileField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'seconds_remaining': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'skip_lines': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'state': ('django.db.models.fields.CharField', [], {'default': "'C'", 'max_length': '2'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']"})
+ },
+ 'ishtar_common.importercolumn': {
+ 'Meta': {'ordering': "('importer_type', 'col_number')", 'unique_together': "(('importer_type', 'col_number'),)", 'object_name': 'ImporterColumn'},
+ 'col_number': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'export_field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'columns'", 'to': "orm['ishtar_common.ImporterType']"}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'regexp_pre_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}),
+ 'required': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ },
+ 'ishtar_common.importerdefault': {
+ 'Meta': {'object_name': 'ImporterDefault'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'defaults'", 'to': "orm['ishtar_common.ImporterType']"}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.importerdefaultvalues': {
+ 'Meta': {'object_name': 'ImporterDefaultValues'},
+ 'default_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'default_values'", 'to': "orm['ishtar_common.ImporterDefault']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'value': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.importerduplicatefield': {
+ 'Meta': {'object_name': 'ImporterDuplicateField'},
+ 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'duplicate_fields'", 'to': "orm['ishtar_common.ImporterColumn']"}),
+ 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}),
+ 'field_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ 'ishtar_common.importermodel': {
+ 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterModel'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'klass': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'ishtar_common.importertype': {
+ 'Meta': {'ordering': "('name',)", 'object_name': 'ImporterType'},
+ 'associated_models': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['ishtar_common.ImporterModel']"}),
+ 'created_models': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.ImporterModel']"}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_template': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'unicity_keys': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.importtarget': {
+ 'Meta': {'object_name': 'ImportTarget'},
+ 'column': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'targets'", 'to': "orm['ishtar_common.ImporterColumn']"}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'concat': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'concat_str': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}),
+ 'force_new': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'formater_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.FormaterType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'regexp_filter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Regexp']", 'null': 'True', 'blank': 'True'}),
+ 'target': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.ishtarsiteprofile': {
+ 'Meta': {'ordering': "['label']", 'object_name': 'IshtarSiteProfile'},
+ 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'base_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(0, 0, 0, 0)'", 'max_length': '200'}),
+ 'base_find_external_id': ('django.db.models.fields.TextField', [], {'default': "'{context_record__external_id}-{label}'"}),
+ 'container_external_id': ('django.db.models.fields.TextField', [], {'default': "'{responsible__external_id}-{index}'"}),
+ 'context_record': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'context_record_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(210,200,0,0.2)'", 'max_length': '200'}),
+ 'context_record_external_id': ('django.db.models.fields.TextField', [], {'default': "'{parcel__external_id}-{label}'"}),
+ 'currency': ('django.db.models.fields.CharField', [], {'default': "u'\\u20ac'", 'max_length': "'5'"}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'file_external_id': ('django.db.models.fields.TextField', [], {'default': "'{year}-{numeric_reference}'"}),
+ 'files': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'files_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(0, 32, 210, 0.1)'", 'max_length': '200'}),
+ 'find': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'find_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(210,0,0,0.15)'", 'max_length': '200'}),
+ 'find_external_id': ('django.db.models.fields.TextField', [], {'default': "'{get_first_base_find__context_record__external_id}-{label}'"}),
+ 'find_index': ('django.db.models.fields.CharField', [], {'default': "'O'", 'max_length': '2'}),
+ 'homepage': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.TextField', [], {}),
+ 'mapping': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'mapping_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(72, 236, 0, 0.15)'", 'max_length': '200'}),
+ 'parcel_external_id': ('django.db.models.fields.TextField', [], {'default': "'{associated_file__external_id}{operation__code_patriarche}-{town__numero_insee}-{section}{parcel_number}'"}),
+ 'person_raw_name': ('django.db.models.fields.TextField', [], {'default': "'{name|upper} {surname}'"}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ 'warehouse': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'warehouse_color': ('django.db.models.fields.CharField', [], {'default': "'rgba(10,20,200,0.15)'", 'max_length': '200'}),
+ 'warehouse_external_id': ('django.db.models.fields.TextField', [], {'default': "'{name|slug}'"})
+ },
+ 'ishtar_common.ishtaruser': {
+ 'Meta': {'object_name': 'IshtarUser', '_ormbases': ['auth.User']},
+ 'advanced_shortcut_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'person': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ishtaruser'", 'unique': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ 'ishtar_common.itemkey': {
+ 'Meta': {'object_name': 'ItemKey'},
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'importer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}),
+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
+ },
+ 'ishtar_common.operationtype': {
+ 'Meta': {'ordering': "['-preventive', 'order', 'label']", 'object_name': 'OperationType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'preventive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.organization': {
+ 'Meta': {'object_name': 'Organization'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_organization'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}),
+ 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Organization']"}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'organization_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.OrganizationType']"}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.organizationtype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'OrganizationType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.person': {
+ 'Meta': {'object_name': 'Person'},
+ 'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_complement': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'alt_address_is_prefered': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'alt_country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'alt_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'alt_town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'}),
+ 'archived': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}),
+ 'attached_to': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'members'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ishtar_common.Organization']"}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'history_creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'history_modifier': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['auth.User']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_person'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'merge_candidate': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_candidate_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'merge_exclusion': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'merge_exclusion_rel_+'", 'null': 'True', 'to': "orm['ishtar_common.Person']"}),
+ 'merge_key': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'mobile_phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'old_title': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'person_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['ishtar_common.PersonType']", 'symmetrical': 'False'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone2': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone3': ('django.db.models.fields.CharField', [], {'max_length': '18', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'phone_desc3': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
+ 'raw_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
+ 'raw_phone': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'salutation': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'surname': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.TitleType']", 'null': 'True', 'blank': 'True'}),
+ 'town': ('django.db.models.fields.CharField', [], {'max_length': '70', 'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.persontype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'PersonType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.regexp': {
+ 'Meta': {'object_name': 'Regexp'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'regexp': ('django.db.models.fields.CharField', [], {'max_length': '500'})
+ },
+ 'ishtar_common.sourcetype': {
+ 'Meta': {'ordering': "['label']", 'object_name': 'SourceType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.spatialreferencesystem': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'SpatialReferenceSystem'},
+ 'auth_name': ('django.db.models.fields.CharField', [], {'default': "'EPSG'", 'max_length': '256'}),
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'order': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'srid': ('django.db.models.fields.IntegerField', [], {}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.state': {
+ 'Meta': {'ordering': "['number']", 'object_name': 'State'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
+ 'number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'})
+ },
+ 'ishtar_common.supporttype': {
+ 'Meta': {'object_name': 'SupportType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.targetkey': {
+ 'Meta': {'unique_together': "(('target', 'key', 'associated_user', 'associated_import'),)", 'object_name': 'TargetKey'},
+ 'associated_import': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Import']", 'null': 'True', 'blank': 'True'}),
+ 'associated_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.IshtarUser']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_set': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'key': ('django.db.models.fields.TextField', [], {}),
+ 'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'keys'", 'to': "orm['ishtar_common.ImportTarget']"}),
+ 'value': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
+ },
+ 'ishtar_common.titletype': {
+ 'Meta': {'ordering': "('label',)", 'object_name': 'TitleType'},
+ 'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'comment': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'txt_idx': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
+ },
+ 'ishtar_common.town': {
+ 'Meta': {'ordering': "['numero_insee']", 'object_name': 'Town'},
+ 'canton': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Canton']", 'null': 'True', 'blank': 'True'}),
+ 'center': ('django.contrib.gis.db.models.fields.PointField', [], {'srid': '27572', 'null': 'True', 'blank': 'True'}),
+ 'departement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ishtar_common.Department']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'imports': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'imported_ishtar_common_town'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['ishtar_common.Import']"}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'numero_insee': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '6'}),
+ 'surface': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['ishtar_common'] \ No newline at end of file
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 83cb25d46..5095619e0 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -90,6 +90,44 @@ def post_save_user(sender, **kwargs):
post_save.connect(post_save_user, sender=User)
+def check_model_access_control(request, model, available_perms=None):
+ """
+ Check access control to a model for a specific request
+
+ :param request: the current request
+ :param model: the concerned model
+ :param available_perms: specific permissions to check if not specified
+ "view" and "view_own" will be checked
+ :return: (allowed, own) tuple
+ """
+ own = True # more restrictive by default
+ allowed = False
+ if not request.user.is_authenticated():
+ return allowed, own
+
+ if not available_perms:
+ available_perms = ['view_' + model.__name__.lower(),
+ 'view_own_' + model.__name__.lower()]
+ if request.user.ishtaruser.has_right('administrator',
+ session=request.session):
+ allowed = True
+ own = False
+ return allowed, own
+ for perm, lbl in model._meta.permissions:
+ if perm not in available_perms:
+ continue
+ cperm = model._meta.app_label + '.' + perm
+ if request.user.has_perm(cperm) \
+ or cperm in request.user.get_all_permissions() \
+ or request.user.ishtaruser.has_right(
+ perm, session=request.session):
+ allowed = True
+ if "_own_" not in perm:
+ own = False
+ break # max right reach
+ return allowed, own
+
+
class Imported(models.Model):
imports = models.ManyToManyField(
'Import', blank=True, null=True,
@@ -1112,6 +1150,8 @@ def get_external_id(key, item):
CURRENCY = ((u"€", _(u"Euro")),
(u"$", _(u"US dollar")))
+FIND_INDEX_SOURCE = ((u"O", _(u"Operations")),
+ (u"CR", _(u"Context records")))
class IshtarSiteProfile(models.Model, Cached):
@@ -1133,6 +1173,11 @@ class IshtarSiteProfile(models.Model, Cached):
default='rgba(210,200,0,0.2)', max_length=200)
find = models.BooleanField(_(u"Finds module"), default=False,
help_text=_(u"Need context records module"))
+ find_index = models.CharField(
+ _(u"Find index is based on"), default='O', max_length=2,
+ choices=FIND_INDEX_SOURCE,
+ help_text=_(u"To prevent irrelevant indexes, change this parameter "
+ u"only if there is no find in the database"))
find_color = models.CharField(
_(u"CSS color code for find module"),
default='rgba(210,0,0,0.15)', max_length=200)
@@ -1370,7 +1415,7 @@ class DashboardFormItem(object):
return q.distinct('pk').count()
-class Dashboard:
+class Dashboard(object):
def __init__(self, model, slice='year', date_source=None, show_detail=None,
fltr={}):
# don't provide date_source if it is not relevant
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css
index 056046e95..4e59b0f64 100644
--- a/ishtar_common/static/media/style.css
+++ b/ishtar_common/static/media/style.css
@@ -228,6 +228,10 @@ label:first-letter {
width: 370px;
}
+.form #login input[type="text"]{
+ width: auto;
+}
+
textarea{
height: 80px;
width: 370px;
diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html
index fd92578a2..2650282ca 100644
--- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html
+++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html
@@ -178,7 +178,7 @@ $('#search_{{unique_id}}').click(function (){
return false;
});
-{% if item_name == 'files' or item_name == "operations"%}
+{% if item_name == 'files' or item_name == "operations" or item_name == "treatments" or item_name == "treatmentfiles" %}
load_jquerydate_{{item_name}}_after();
load_jquerydate_{{item_name}}_before();
{% endif %}
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 095056c2e..a91a0ba58 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -288,6 +288,17 @@ class CacheTest(TestCase):
self.assertFalse('testy' in types)
+class AccessControlTest(TestCase):
+ def test_administrator(self):
+ admin, created = models.PersonType.objects.get_or_create(
+ txt_idx='administrator', defaults={'label': 'Admin'})
+ user, created = User.objects.get_or_create(username='myusername')
+ user.is_superuser = True
+ user.save()
+ ishtar_user = models.IshtarUser.objects.get(username=user.username)
+ self.assertIn(admin, ishtar_user.person.person_types.all())
+
+
class AdminGenTypeTest(TestCase):
fixtures = [settings.ROOT_PATH +
'../fixtures/initial_data-auth-fr.json',
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index e8a2c9e12..f185576ea 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -63,6 +63,8 @@ from archaeological_finds.models import Find, Treatment, TreatmentFile, \
from archaeological_operations.forms import DashboardForm as DashboardFormOpe
from archaeological_files.forms import DashboardForm as DashboardFormFile
+from archaeological_finds.forms import DashboardTreatmentForm, \
+ DashboardTreatmentFileForm
from ishtar_common.forms import FinalForm, FinalDeleteForm
from ishtar_common.widgets import JQueryAutoComplete
@@ -584,47 +586,26 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
"""
def func(request, data_type='json', full=False, force_own=False,
col_names=None, **dct):
- # check rights
- own = True # more restrictive by default
- allowed = False
+ available_perms = []
if specific_perms:
available_perms = specific_perms[:]
- else:
- available_perms = ['view_' + model.__name__.lower(),
- 'view_own_' + model.__name__.lower()]
EMPTY = ''
if 'type' in dct:
data_type = dct.pop('type')
if not data_type:
EMPTY = '[]'
data_type = 'json'
- if not request.user.is_authenticated():
+
+ allowed, own = models.check_model_access_control(request, model,
+ available_perms)
+ if not allowed:
return HttpResponse(EMPTY, mimetype='text/plain')
- if request.user.ishtaruser.has_right('administrator',
- session=request.session):
- allowed = True
- own = False
- else:
- for perm, lbl in model._meta.permissions:
- if perm not in available_perms:
- continue
- cperm = model._meta.app_label + '.' + perm
- if request.user.has_perm(cperm) \
- or cperm in request.user.get_all_permissions() \
- or request.user.ishtaruser.has_right(
- perm, session=request.session):
- allowed = True
- if "_own_" not in perm:
- own = False
- break # max right reach
if force_own:
own = True
if full == 'shortcut' and 'SHORTCUT_SEARCH' in request.session and \
request.session['SHORTCUT_SEARCH'] == 'own':
own = True
- if not allowed:
- return HttpResponse(EMPTY, mimetype='text/plain')
# get defaults from model
if not extra_request_keys and hasattr(model, 'EXTRA_REQUEST_KEYS'):
@@ -1211,10 +1192,18 @@ def display_item(model, extra_dct=None, show_url=None):
def show_item(model, name, extra_dct=None):
def func(request, pk, **dct):
+ allowed, own = models.check_model_access_control(request, model)
+ if not allowed:
+ return HttpResponse('', content_type="application/xhtml")
+ q = model.objects
+ if own:
+ query_own = model.get_query_owns(request.user)
+ if query_own:
+ q = q.filter(query_own)
try:
- item = model.objects.get(pk=pk)
+ item = q.get(pk=pk)
except ObjectDoesNotExist:
- return HttpResponse(None)
+ return HttpResponse('NOK')
doc_type = 'type' in dct and dct.pop('type')
url_name = u"/".join(reverse('show-' + name, args=['0', '']
).split('/')[:-2]) + u"/"
@@ -1458,7 +1447,11 @@ def dashboard_main(request, dct, obj_id=None, *args, **kwargs):
return render_to_response('ishtar/dashboards/dashboard_main.html', dct,
context_instance=RequestContext(request))
-DASHBOARD_FORMS = {'files': DashboardFormFile, 'operations': DashboardFormOpe}
+DASHBOARD_FORMS = {
+ 'files': DashboardFormFile, 'operations': DashboardFormOpe,
+ 'treatments': DashboardTreatmentForm,
+ 'treatmentfiles': DashboardTreatmentFileForm
+}
def dashboard_main_detail(request, item_name):
@@ -1473,8 +1466,11 @@ def dashboard_main_detail(request, item_name):
form = None
slicing, date_source, fltr, show_detail = 'year', None, {}, False
profile = models.get_current_profile()
- if (item_name == 'files' and profile.files) \
- or item_name == 'operations':
+ has_form = (item_name == 'files' and profile.files) \
+ or item_name == 'operations' \
+ or (item_name in ('treatmentfiles', 'treatments')
+ and profile.warehouse)
+ if has_form:
slicing = 'month'
if item_name in DASHBOARD_FORMS:
if request.method == 'POST':
@@ -1490,8 +1486,7 @@ def dashboard_main_detail(request, item_name):
form = DASHBOARD_FORMS[item_name]()
lbl, dashboard = None, None
dashboard_kwargs = {}
- if (item_name == 'files' and profile.files) \
- or item_name == 'operations':
+ if has_form:
dashboard_kwargs = {'slice': slicing, 'fltr': fltr,
'show_detail': show_detail}
# date_source is only relevant when the form has set one
@@ -1515,12 +1510,13 @@ def dashboard_main_detail(request, item_name):
elif item_name == 'treatmentfiles' and profile.warehouse:
lbl, dashboard = (
_(u"Treatment requests"),
- models.Dashboard(TreatmentFile, slice=slicing, fltr=fltr))
+ models.Dashboard(TreatmentFile, **dashboard_kwargs))
elif item_name == 'treatments' and profile.warehouse:
+ if 'date_source' not in dashboard_kwargs:
+ dashboard_kwargs['date_source'] = 'start'
lbl, dashboard = (
_(u"Treatments"),
- models.Dashboard(Treatment, slice=slicing, fltr=fltr,
- date_source='start'))
+ models.Dashboard(Treatment, **dashboard_kwargs))
if not lbl:
raise Http404
dct = {'lbl': lbl, 'dashboard': dashboard,