Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Add override on CSV exports for super admins (#4070)

Adrian Gruntkowski70ed30e871e1
diff --git a/lib/plausible_web/templates/site/settings_imports_exports.html.heex b/lib/plausible_web/templates/site/settings_imports_exports.html.heex
index eb04a3eae2..874b68a0c6 100644
--- a/lib/plausible_web/templates/site/settings_imports_exports.html.heex
+++ b/lib/plausible_web/templates/site/settings_imports_exports.html.heex
@@ -20,7 +20,7 @@
) %>
</div>
-<%= if FunWithFlags.enabled?(:csv_imports_exports, for: @site) do %>
+<%= if FunWithFlags.enabled?(:csv_imports_exports, for: @site) or Plausible.Auth.is_super_admin?(@current_user) do %>
<div class="shadow bg-white dark:bg-gray-800 dark:text-gray-200 sm:rounded-md sm:overflow-hidden py-6 px-4 sm:p-6">
<header class="relative border-b border-gray-200 pb-4 mb-5">
<h2 class="text-lg leading-6 font-medium text-gray-900 dark:text-gray-100">