diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-10-29 17:50:49 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:43:49 +0100 |
commit | 547a20789faf6bbc9979357c7f65cbe61e56ed07 (patch) | |
tree | 5ede13492f49434468607950769266d643333d11 /archaeological_files/models.py | |
parent | fcc0bb255730d43ec2cff78fb8b948d6322a8b68 (diff) | |
download | Ishtar-547a20789faf6bbc9979357c7f65cbe61e56ed07.tar.bz2 Ishtar-547a20789faf6bbc9979357c7f65cbe61e56ed07.zip |
✨ permissions refactoring: link items to user QA forms
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index b3815c95d..04481889f 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -45,26 +45,27 @@ from ishtar_common.utils import ( ) from ishtar_common.models import ( + BaseHistorizedItem, + CompleteIdentifierItem, + DashboardFormItem, Department, + Document, + DocumentItem, GeneralType, GlobalVar, - BaseHistorizedItem, - Imported, - OwnPerms, - Person, - Organization, - Town, - DashboardFormItem, HistoricalRecords, - ValueGetter, + HistoryModel, + Imported, MainItem, OperationType, + Organization, + OwnPerms, + Person, post_save_cache, - Document, - HistoryModel, + QuickAction, SearchVectorConfig, - DocumentItem, - CompleteIdentifierItem, + Town, + ValueGetter, ) from archaeological_operations.models import ( @@ -619,6 +620,16 @@ class File( HISTORICAL_M2M = ["towns", "departments"] SERIALIZE_PROPERTIES = ["external_id"] + QA_LINK = QuickAction( + url="file-qa-link", + icon_class="fa fa-link", + text=_("Link to account"), + target="many", + rights=["ishtaradmin"], + ) + QUICK_ACTIONS = [ + QA_LINK + ] # fields year = models.IntegerField(_("Year"), default=get_current_year) |