From 7c01998c10318d690aaf7f9d0aa1caf6e6581cf8 Mon Sep 17 00:00:00 2001 From: Michael Collins <15347726+michaeljcollinsuk@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:16:27 +0100 Subject: [PATCH] Update datasource detail page only accessible to superuser when deleted --- .../frontend/jinja2/datasource-detail.html | 13 +++++-- controlpanel/frontend/views/datasource.py | 6 +++ tests/frontend/views/test_datasource.py | 37 ++++++++++++++++++- 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/controlpanel/frontend/jinja2/datasource-detail.html b/controlpanel/frontend/jinja2/datasource-detail.html index 0c133010a..d7ac893f2 100644 --- a/controlpanel/frontend/jinja2/datasource-detail.html +++ b/controlpanel/frontend/jinja2/datasource-detail.html @@ -20,9 +20,15 @@
- - Open on AWS - + {% if bucket.is_deleted %} +
+ This bucket was deleted by {{ user_name(bucket.deleted_by) }} on {{ bucket.deleted_at.strftime("%Y/%m/%d %H:%M:%S") }}. +
+ {% else %} + + Open on AWS + + {% endif %}