summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/models.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index dd265fb1d..3f4f252c3 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -447,6 +447,10 @@ class ArchaeologicalSite(
"documents__associated_file__isnull",
"documents__associated_url__isnull",
]
+ UPPER_PERMISSIONS = [
+ (("archaeological_operations", "operation"),
+ "operations__pk"),
+ ]
ALT_NAMES = {
"reference": SearchAltName(
pgettext_lazy("key for text search", "reference"), "reference__iexact"
@@ -1321,6 +1325,10 @@ class Operation(
"cached_remains",
"cached_label",
]
+ UPPER_PERMISSIONS = [
+ (("archaeological_files", "file"),
+ "associated_file_id"),
+ ]
objects = UUIDModelManager()
# alternative names of fields for searches
@@ -2825,7 +2833,8 @@ post_save.connect(post_save_cache, sender=ActType)
post_delete.connect(post_save_cache, sender=ActType)
-class AdministrativeAct(DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter, SheetItem):
+class AdministrativeAct(DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter,
+ SheetItem):
SHOW_URL = "show-administrativeact"
TABLE_COLS = [
"full_ref",
@@ -3068,6 +3077,16 @@ class AdministrativeAct(DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter,
"operation__towns__numero_insee__startswith": "_get_department_code",
"associated_file__towns__numero_insee__startswith": "_get_department_code",
}
+ UPPER_PERMISSIONS = [
+ (("archaeological_operations", "operation"),
+ "operation_id"),
+ (("archaeological_files", "file"),
+ "associated_file_id"),
+ (("archaeological_finds", "treatmentfile"),
+ "treatment_file_id"),
+ (("archaeological_finds", "treatment"),
+ "treatment_id"),
+ ]
# fields
act_type = models.ForeignKey(