diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-06 18:06:01 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-06 18:06:01 +0100 |
commit | b16a39fff95c60711b74ba33977de855d16a1204 (patch) | |
tree | 5939b2cd46e72d9eac7954b620d5be03659b9a52 /archaeological_context_records/models.py | |
parent | 6bfcffe23290c79c7d72e0aec45bd9ed86d52c14 (diff) | |
download | Ishtar-b16a39fff95c60711b74ba33977de855d16a1204.tar.bz2 Ishtar-b16a39fff95c60711b74ba33977de855d16a1204.zip |
Profile: do not display geo item list when mapping is deactivated (refs #4467)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index bfdda4bfe..3ff8f9d3f 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -1114,7 +1114,8 @@ class ContextRecord( actions = super(ContextRecord, self).get_extra_actions(request) # is_locked = hasattr(self, "is_locked") and self.is_locked(request.user) - can_add_geo = self.can_do(request, "add_geovectordata") + profile = get_current_profile() + can_add_geo = profile.mapping and self.can_do(request, "add_geovectordata") if can_add_geo: actions.append(self.get_add_geo_action()) can_create_find = self.can_do(request, "add_find") |