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_operations/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_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 9e43f264b..debc26d8b 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -584,6 +584,13 @@ class ArchaeologicalSite( "archaeological_operations.change_own_archaeologicalsite" ], ) + QA_LINK = QuickAction( + url="site-qa-link", + icon_class="fa fa-link", + text=_("Link to account"), + target="many", + rights=["ishtaradmin"], + ) QA_EDIT = QuickAction( url="site-qa-bulk-update", icon_class="fa fa-pencil", @@ -596,7 +603,6 @@ class ArchaeologicalSite( ) QUICK_ACTIONS = [ QA_EDIT, - QA_LOCK, QuickAction( url="site-add-operation", icon_class="fa fa-plus", @@ -615,6 +621,8 @@ class ArchaeologicalSite( "archaeological_operations.change_own_archaeologicalsite" ], ), + QA_LOCK, + QA_LINK ] objects = SiteManager() @@ -1478,9 +1486,15 @@ class Operation( "archaeological_operations.change_own_operation" ], ) + QA_LINK = QuickAction( + url="operation-qa-link", + icon_class="fa fa-link", + text=_("Link to account"), + target="many", + rights=["ishtaradmin"], + ) QUICK_ACTIONS = [ QA_EDIT, - QA_LOCK, QuickAction( url="operation-qa-duplicate", icon_class="fa fa-clone", @@ -1491,6 +1505,8 @@ class Operation( "archaeological_operations.change_own_operation" ], ), + QA_LOCK, + QA_LINK, ] UP_MODEL_QUERY = { |