diff --git a/indigo_app/templates/indigo_api/timeline/_work_points_in_time.html b/indigo_app/templates/indigo_api/timeline/_work_points_in_time.html
index d262f7f01..b9704cc7f 100644
--- a/indigo_app/templates/indigo_api/timeline/_work_points_in_time.html
+++ b/indigo_app/templates/indigo_api/timeline/_work_points_in_time.html
@@ -80,6 +80,15 @@
{{ entry.date|date:"Y-m-d" }}
{{ task.description|linebreaks|urlize }}
{% endfor %}
+ {% if perms.indigo_api.publish_document %}
+
+ {% for document in entry.expressions %}
+
+ {% endfor %}
+
+ {% endif %}
{% if editable and entry.create_import_document %}
diff --git a/indigo_app/views/documents.py b/indigo_app/views/documents.py
index 968da4b3f..a382a4d03 100644
--- a/indigo_app/views/documents.py
+++ b/indigo_app/views/documents.py
@@ -98,6 +98,7 @@ class ChooseDocumentProvisionView(AbstractAuthedIndigoView, DetailView):
context_object_name = 'document'
pk_url_kwarg = 'doc_id'
template_name = 'indigo_api/document/_provisions.html'
+ permission_required = ('indigo_api.publish_document',)
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
@@ -119,13 +120,11 @@ def descend_toc_dict(items):
elem['href'] = reverse('document_provision', kwargs={'doc_id': int(self.kwargs['doc_id']), 'eid': elem['id']})
return json.dumps(toc)
- def has_permission(self):
- return self.request.user.is_superuser
-
class DocumentProvisionDetailView(DocumentDetailView):
eid = None
provision_xml = None
+ permission_required = ('indigo_api.publish_document',)
def get(self, request, *args, **kwargs):
document = self.get_object()
@@ -145,9 +144,6 @@ def get_context_data(self, **kwargs):
def get_document_content_json(self, document):
return json.dumps(etree.tostring(self.provision_xml, encoding='unicode'))
- def has_permission(self):
- return self.request.user.is_superuser
-
class DocumentPopupView(AbstractAuthedIndigoView, DetailView):
model = Document