diff --git a/marine_mammal_incidents/templates/marine_mammal_incidents/incident_list.html b/marine_mammal_incidents/templates/marine_mammal_incidents/incident_list.html
index dde9288c..59479197 100644
--- a/marine_mammal_incidents/templates/marine_mammal_incidents/incident_list.html
+++ b/marine_mammal_incidents/templates/marine_mammal_incidents/incident_list.html
@@ -2,7 +2,7 @@
{% load static bootstrap4 %}
{% load proper_paginate %}
{% load url_replace %}
-{% load group_filters %}
+{% load mmi_group_filters %}
{% block extra_style %}
{{ block.super }}
@@ -146,7 +146,9 @@
Marine Mammal Incidents
Species |
Location |
Type |
+ {% if request.user|mmi_has_group:"data curator" or request.user.is_superuser or request.user|mmi_has_group:"MARINE_ANIMAL_INCIDENTS"%}
Actions |
+ {% endif %}
@@ -156,9 +158,11 @@ Marine Mammal Incidents
{{ incident.species }} |
{{ incident.location_name }} |
{{ incident.get_incident_type_display }} |
+ {% if request.user|mmi_has_group:"data curator" or request.user.is_superuser or request.user|mmi_has_group:"MARINE_ANIMAL_INCIDENTS"%}
View / Update
|
+ {% endif %}
{% empty %}
No incidents recorded yet. |
diff --git a/marine_mammal_incidents/templatetags/__init__.py b/marine_mammal_incidents/templatetags/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/marine_mammal_incidents/templatetags/group_filters.py b/marine_mammal_incidents/templatetags/mmi_group_filters.py
similarity index 100%
rename from marine_mammal_incidents/templatetags/group_filters.py
rename to marine_mammal_incidents/templatetags/mmi_group_filters.py
diff --git a/marine_mammal_incidents/views.py b/marine_mammal_incidents/views.py
index 37f33887..7e369827 100644
--- a/marine_mammal_incidents/views.py
+++ b/marine_mammal_incidents/views.py
@@ -15,7 +15,7 @@
from django.core.exceptions import PermissionDenied
def user_in_marine_animal_incidents_group(user):
- return user.is_superuser or user.groups.filter(name='MARINE_ANIMAL_INCIDENTS').exists()
+ return user.is_superuser or user.groups.filter(name='MARINE_ANIMAL_INCIDENTS') or user.groups.filter(name='data curator').exists()
@user_passes_test(user_in_marine_animal_incidents_group, login_url=None, redirect_field_name=None)
def incident_form(request, pk=None):
diff --git a/wamtram2/templatetags/__init__.py b/wamtram2/templatetags/__init__.py
new file mode 100644
index 00000000..e69de29b