From 547a20789faf6bbc9979357c7f65cbe61e56ed07 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 29 Oct 2024 17:50:49 +0100 Subject: ✨ permissions refactoring: link items to user QA forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_context_records/models.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'archaeological_context_records/models.py') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 1bb09717d..21cc507c1 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -795,6 +795,13 @@ class ContextRecord( "archaeological_context_records.change_own_contextrecord" ], ) + QA_LINK = QuickAction( + url="contextrecord-qa-link", + icon_class="fa fa-link", + text=_("Link to account"), + target="many", + rights=["ishtaradmin"], + ) QA_EDIT = QuickAction( url="contextrecord-qa-bulk-update", icon_class="fa fa-pencil", @@ -807,7 +814,6 @@ class ContextRecord( ) QUICK_ACTIONS = [ QA_EDIT, - QA_LOCK, QuickAction( url="contextrecord-qa-duplicate", icon_class="fa fa-clone", @@ -818,6 +824,8 @@ class ContextRecord( "archaeological_context_records.change_own_contextrecord" ], ), + QA_LOCK, + QA_LINK, ] SERIALIZE_EXCLUDE = MainItem.SERIALIZE_EXCLUDE + ["contextrecord"] SERIALIZE_PROPERTIES = MainItem.SERIALIZE_PROPERTIES + [ -- cgit v1.2.3