summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index ccc145c48..2611b7dfd 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -791,14 +791,20 @@ class ContextRecord(
icon_class="fa fa-lock",
text=_("Lock/Unlock"),
target="many",
- rights=["change_contextrecord", "change_own_contextrecord"],
+ rights=[
+ "archaeological_context_records.change_contextrecord",
+ "archaeological_context_records.change_own_contextrecord"
+ ],
)
QA_EDIT = QuickAction(
url="contextrecord-qa-bulk-update",
icon_class="fa fa-pencil",
text=_("Bulk update"),
target="many",
- rights=["change_contextrecord", "change_own_contextrecord"],
+ rights=[
+ "archaeological_context_records.change_contextrecord",
+ "archaeological_context_records.change_own_contextrecord"
+ ],
)
QUICK_ACTIONS = [
QA_EDIT,
@@ -808,7 +814,10 @@ class ContextRecord(
icon_class="fa fa-clone",
text=_("Duplicate"),
target="one",
- rights=["change_contextrecord", "change_own_contextrecord"],
+ rights=[
+ "archaeological_context_records.change_contextrecord",
+ "archaeological_context_records.change_own_contextrecord"
+ ],
),
]
SERIALIZE_EXCLUDE = MainItem.SERIALIZE_EXCLUDE + ["contextrecord"]
@@ -1159,12 +1168,15 @@ class ContextRecord(
actions = super().get_extra_actions(request)
is_locked = hasattr(self, "is_locked") and self.is_locked(request.user)
- can_edit_cr = self.can_do(request, "change_contextrecord")
+ can_edit_cr = self.can_do(
+ request, "archaeological_context_records.change_contextrecord"
+ )
profile = get_current_profile()
- can_add_geo = profile.mapping and self.can_do(request, "add_geovectordata")
+ can_add_geo = profile.mapping and \
+ self.can_do(request, "ishtar_common.add_geovectordata")
if can_add_geo:
actions.append(self.get_add_geo_action())
- can_create_find = self.can_do(request, "add_find")
+ can_create_find = self.can_do(request, "archaeological_finds.add_find")
if can_create_find:
actions += [
(