diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-11-07 17:31:57 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:43:49 +0100 |
commit | ce7d642318f4e4c57dd552915b12eef360d33d70 (patch) | |
tree | 64e499aec7087f8cca3159251c4bd107bedc416d /archaeological_finds/models_treatments.py | |
parent | 89ff92664ff06a974e37c15ab663394271ac4a10 (diff) | |
download | Ishtar-ce7d642318f4e4c57dd552915b12eef360d33d70.tar.bz2 Ishtar-ce7d642318f4e4c57dd552915b12eef360d33d70.zip |
✨ permissions refactoring: settings for upstream items management
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 45dc26c16..a26df8b6a 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -207,6 +207,16 @@ class Treatment( ] PARENT_SEARCH_VECTORS = ["person", "organization"] GET_VALUES_M2M = ["treatment_types"] + UPPER_PERMISSIONS = [ + (("archaeological_finds", "treatmentfile"), + "file_id"), + (("archaeological_finds", "find"), + "downstream__pk"), + (("archaeological_finds", "find"), + "upstream__pk"), + (("archaeological_finds", "find"), + "finds__pk"), + ] objects = ExternalIdManager() label = models.CharField(_("Label"), blank=True, null=True, max_length=200) @@ -1150,6 +1160,10 @@ class TreatmentFile( "documents__associated_file__isnull", "documents__associated_url__isnull", ] + UPPER_PERMISSIONS = [ + (("archaeological_finds", "find"), + "associated_basket__items__pk"), + ] # alternative names of fields for searches ALT_NAMES = { "name": SearchAltName( |